Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw

Support for: Salutation: WordPress + BuddyPress Theme

Salutation (WordPress)

Public Group  |  active 4 years, 5 months ago ago
Viewing post 1 to 4 (4 total posts)

Is the_content() getting called multiple times?

  • sumit4all

    said

    On my single post page, I have the breadcrumb above the post (using minimal header static), then the post content, and then the footer (using default footer static)
    I also have a plugin which applies a filter on the_content and adds related posts to the end of the post content.

    In my pages, I am seeing the same related posts in three places, after breadcrumb, after post content (its right place) and after the footer. Why is this happening? It was not happening with the earlier theme?

    Something tells me the_content() is getting used many times and therefore it is showing in the breadcrumb and footer? any ideas how to remedy this, and why is it happening in the first place?

  • sumit4all

    said

    I guess it is getting called because the_content is also being called for the custom post type ‘static’. Is there any way to distinguish the different the_content calls (for type post and type static) so that either I can change the code of the plugin causing the problem or can I chance something in the theme code to fix it.

  • Steve

    said

    Hi @sumit4all,

    A feature to fix this will be released within the next couple of weeks.

  • sumit4all

    said

    I temprarily fixed this passing an extra parameter to apply_filter from the theme and checking in my existing plugins and not doing anything if this parameter is coming, which will come only for post type static.. I hope this wont break anything :P

Viewing post 1 to 4 (4 total posts)