WordPress.org

Ready to get started?Download WordPress

Forums

"more tag" not working on updated blog, custom theme... (11 posts)

  1. stml
    Member
    Posted 4 years ago #

    I recently did some work on a client's blog. The work involved making some tweaks to their custom theme, doing staged upgrades from a very early version of WP up to current, and installing on a new host.

    However, along the line, the <!--more--> tag stopped working. It was working before the upgrade, I can enter it in posts fine, but it simply doesn't activate on the blog, showing full-length posts on the front page. It doesn't work on the default theme either - so it's not a problem with the custom theme.

    The tweaking did not involve editing index.php, where the_content('Read more...') tag is.

    I've also tried deactivating several plugins that do stuff to the post body, and might be conflicting. No luck.

    Does anyone understand the mechanism of the more tag? What could stop it functioning like this?

    I've googled all over the place, but nothing fits - most of the solutions involve using an Extract plugin, which is not practicable in this case.

    Many thanks.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Did you try deactivating all plugins?

  3. stml
    Member
    Posted 4 years ago #

    Yes, I've tried deactivating all plugins. It's definitely not a plugin issue.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Try re-uploading the wp-includes folder?

  5. thatruth2006
    Member
    Posted 4 years ago #

    The thing is that the more thing doesn't have to do with index.php, but rather single.php, that issue a lot of times is that the <?php the_content(); ?> function does not exist in that .php file, make sure you check to see if its in single.php and page.php.

  6. stml
    Member
    Posted 4 years ago #

    @thatruth2006 I'm not sure that makes sense... the_content() is in use on all these templates - it certainly has *something* to do with index.php...

    This problem is still occurring - no solution found as yet...

  7. StevieG
    Member
    Posted 4 years ago #

    Try this

    <?php global $more; $more = 0; ?>

    //The code must be inserted ahead of the call to the content

    <?php the_content('Continue Reading'); ?>

  8. cosmocanuck
    Member
    Posted 4 years ago #

    Beautiful! That works like a charm. Please mark this "resolved" (if it works for you too, of course!)

  9. Jomik
    Member
    Posted 4 years ago #

    I've got the same issue. Whole posts are displayed and the "more..."-links never show up.

    <?php global $more; $more = 0; ?>
    did not solve the problem. It made the_content('more...') display a link to the same page, displaying only the first part of the post.

    Setting globals like this doesn't seem wise and shouldn't be necessary.

    Is this a bug?

  10. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    @Jomik:
    can you give <!--more--> (lol) information:

    which page template are you looking at?
    (index.pgp. single.php, page template ...)
    (for instance, single.php would not show the 'read more')

    your theme?

    link?

    http://codex.wordpress.org/Customizing_the_Read_More

  11. Rhand
    Member
    Posted 3 years ago #

    I have the same issue as Jomik and opened a thread here: http://wordpress.org/support/topic/424684?replies=3#post-1601588 . The read more link now show on page.php and hides the rest of the content after the <!--more-->, but clicking on it does not show the rest of the content. It seems you need a custom loop using wp_query for this. Have not found out how just yet.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags