Dear Folks and Support Team!
This is my Enfold code:
function misi_pdf_preview()
{
echo "Hello Word - by content";
}
add_filter("ava_after_content", "misi_pdf_preview", 10, 0);
I don’t know what happened because… it worked a few months ago… but not today…
Rendering was fine with wp debug, no errors displayed…
So, I had to changed the original Enfold code to the native WP method, this method works:
function misi_pdf_preview2($content )
{
$before = '';
after = "Hello Word - after the content";
//modify the incoming content
content = $before . content . after;
return $content;
}
add_filter( 'the_content', 'misi_pdf_preview2' );
Do you have any suggestion to find out why the original Enfold method is not working?
Thanks for your help,
Mihály Földesi
Hey korpak,
Thank you for the inquiry.
You have to use add_action instead of add_filter because ava_after_content is an action hook.
// https://developer.wordpress.org/reference/functions/add_action/
Examples can be found in the following threads.
// https://kriesi.at/support/topic/is-it-possible-to-place-a-button-at-the-bottom-of-all-blog-posts/#post-1418664
// https://kriesi.at/support/topic/custom-post-archive/#post-1302542
// https://kriesi.at/support/topic/is-it-possible-to-place-a-button-at-the-bottom-of-all-blog-posts/#post-1418240
Best regards,
Ismael