Support » Fixing WordPress » “more tag” not working on updated blog, custom theme…

  • 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Did you try deactivating all plugins?

    Thread Starter stml

    (@stml)

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

    Try re-uploading the wp-includes folder?

    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.

    Thread Starter stml

    (@stml)

    @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…

    Try this

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

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

    <?php the_content(‘Continue Reading’); ?>

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

    jomik

    (@jomik)

    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?

    Michael

    (@alchymyth)

    @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

    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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘“more tag” not working on updated blog, custom theme…’ is closed to new replies.