WordPress.org

Ready to get started?Download WordPress

Ideas

update the_content with a parameter to respect on single pages

  1. agentfitz
    Member

    I have seen many people struggling with this on the forums and it nabbed me today. (http://wordpress.org/support/topic/the_content-not-responding-to-the-more-tag-outside-of-wp?replies=10)

    I built a page to serve as the listing page for many case studies, a custom post type. In that page's custom template I wrote a custom loop to retrieve and display the templates appropriately. However, using the_content would not respect the <!--more--> tag defined in the post content unless I manually overrode the global $more variable:

    global $more;
    $more = false;
    the_content("continue reading...");
    $more = true;

    This is very hackish and I would love it if there were a parameter added to the_content to prevent us from having to do this:

    the_content("continue reading...", true); // true meaning force "more respect" or whatever you want to call it.

    Thanks!

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    1 Vote
  • Status

    This idea is under consideration