Hello,
I created a custom landing page for my blog that has a color area with a special heading in it.
This is the page: https://www.epkdesign.com/doescher/blog/
I would like that color area with the blog special heading to be on all the individual blog posts and category pages:
https://www.epkdesign.com/doescher/blog/category/blog/extraordinary-customer-client-service/
This is a redesign of an existing site so there are hundreds of blog posts.
How do I do that?
Thanks so much for your help.
Hi,
Thank you for the inquiry.
You might have to enable the debug mode so that you can extract the actual shortcode of the color section with the special heading element from the debug mode field of the advance layout builder. You can then directly use the extracted shortcode in the single.php file template, or use the ava_after_main_title action hook in the functions.php file to insert the shortcode above the single post content.
To enable the debug mode, please check the following documentation.
// https://kriesi.at/documentation/enfold/intro-to-layout-builder/#debug-mode
The hook might look something like this.
add_action("ava_after_main_title", function() {
echo do_shortcode("PLACE THE EXTRACTED SHORTCODE HERE");
}, 10);
Another thing that you might need to add in the functions.php file is this filter.
function avf_custom_exec_sc_only_mod( $exec_sc_only, $obj_sc, $atts, $content, $shortcodename, $fake ) {
return true;
}
add_filter( 'avf_alb_exec_sc_only', 'avf_custom_exec_sc_only_mod', 10, 6 );
Best regards,
Ismael