Problem:
I have a layout with some content and a CRED Edit Link in that Layout.
The Link should lead to the CRED Edit Form, but I want that Form to be displayed by a single Layout, not within the above mentioned Layout.
This way, i could replace teh ENTIRE template by a specific Layout, that holds only the CRED Form
Can I do that?
Solution:
Yes.
1. Create your specific Layout and add the CRED edit Form in it
2. Copy the ID of that Layout and replace the ID in the code below with it
3. The Code below shoudl go to your theme functions.php
add_filter('get_layout_id_for_render', function($id, $slug){ global $post; if( null !== $post && $post->post_type === 'WHAT_I_NEED' && isset($_GET['cred-edit-form']) ){ $id = 'ID_OF_LAYOUT_I_WANT'; } return $id; } );
==> Replace WHAT_I_NEED with the Post Type Slug
==> Replace ID_OF_LAYOUT_I_WANT with the ID of the Layout with the CRED form
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 23 replies, has 3 voices.
Last updated by Beda 7 years, 8 months ago.
Assisted by: Beda.