Hello, to display a footer widget below each piece of content in a blog post in category 3, I used the code below. This works perfectly with normal blog posts, but NOT with blog posts that have been edited with ALB. What is wrong here?
— CODE —
// Widget Footer fuer Blog – Angebote
function enfold_widget_before_footer_for_single_post() {
if(is_singular(‘post’) && in_category(‘3’)){
dynamic_sidebar( ‘blog-footer’ );
}
}
add_action(‘ava_after_content’, ‘enfold_widget_before_footer_for_single_post’ );
Hey Mike61,
Thank you for the inquiry.
For posts created with the Advanced Layout Builder (ALB), you need to use the avf_template_builder_content filter. The code might look different since it’s not a hook. Please check the enfold/template-builder.php file for the available hooks and filters.
Best regards,
Ismael
Hey Ismael,
It would be great if you could explain that to me in a little more detail, as I don’t think I can manage it that way.
So instead of
add_action(‘ava_after_content’, ‘enfold_widget_before_footer_for_single_post’);
then like this
add_action(‘avf_template_builder_content’, ‘enfold_widget_before_footer_for_single_post’);
???
Regards,
Mike
Hey Ismael,
thank you, I got it in an older post:
Regards
Mike
