• Resolved mmond

    (@mmond)


    Hi folks,

    I think this is a basic plugin development query.

    I’m trying to render my plugin data in place of the center column content. I can hook in successfully and display the plugin data, but it appears along with whatever post would normally display there, the Hello world default post, for example. So, I’m looking to remove what would normally render there.

    I think this is done with a remove filter, but I’ve tried the ones that seem appropriate like:
    remove_filter(‘the_content’, “the_post”);
    and
    remove_filter(‘loop_start’, “the_content”);

    But the hello world post still appears under my plugin content.

    Any info or thoughts on how to replace that content when the plugin activates is much appreciated.

    Thanks!
    Mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mmond

    (@mmond)

    Looks like I can use:
    remove_filter('loop_start', "the_post");
    which will remove the home page post, but I still get the categories and number of comments information posted. Also, if other posts are added, I still get those listed below.

    Perhaps these are displayed outside “The Loop”?

    Thanks again,
    Mark

    Thread Starter mmond

    (@mmond)

    I never heard any suggestions about this, so decided to work around the problem by displaying the plugin content via a Page instead of a Post.

    I was able to remove the title and the post content via:

    It requires an extra step (creating a Page) but it removes all the extra Post information displayed on the home page.

    Best,
    Mark
    http://markpreynolds.com

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Replacing post content with plugin content’ is closed to new replies.