Forums

Calling dynamic sidebar at end of post content problem (1 post)

  1. scottbothel
    Member
    Posted 10 months ago #

    Ok, I appreciate any help here... trying to use add_filter on the_content to append a random sidebar from 4 already registered. Instead of appearing after the content, it is appearing before. If I just use text, it appears after just fine. Anybody know why the sidebar content appears before my content instead????

    $get_random_banner_sidebar = dynamic_sidebar('Banner Ad' . rand(1, 4) . '');
    function add_post_content($content) {
    	return $content.'<h1>Test text</h1>'. $get_random_banner_sidebar .'';
    }
    add_filter('the_content', 'add_post_content');

    Thanks!

Reply

You must log in to post.

About this Topic