Occasionally fail to append DIV at the end of the post with filter the_content
-
Hi,
I am trying to append a div at the end of the content.
I succeed to do so in some wordpress blogs, but others simply do not add the div.
I tested and saw that the my_add_widget function is being invoked in all blogs – but the div is just not appended in some cases.Example of blog that do succeed to append the div: http://www.mixedwaves.com/
Example of blog that fails to append the div:
http://www.motorbikenews.co.uk/video-samsung-honda-meet-the-raf/Code:
function my_add_widget($content)
{
$linkToPost = get_permalink($post->ID);
$content .= ‘<div id=”ewidget_’. $post->ID .'”></div>’;
return $content;
}add_filter(‘the_content’, ‘my_add_widget’);
Any idea why is that?
Best,
Anat.
- The topic ‘Occasionally fail to append DIV at the end of the post with filter the_content’ is closed to new replies.