WordPress.org

Forums

[resolved] More tag isn't working (13 posts)

  1. DJD_79
    Member
    Posted 4 years ago #

    Hello ya'll.

    I've tried it over and over again, in different php files, used this forum, the search button, Google, but it just won't work.

    For my website I use the theme Esther. In this theme the more tag isn't working, but sometimes I just miss this function. I also use the plug-in inline posts but I'm not sure if this is giving extra problems.

    Can somebody give a little help?

    Gr. Dennis, who is now going to bed, otherwise the PC is
    having a crash-core in flying, from six meters high...

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Do the theme template files use the_content() or the_excerpt()?

  3. DJD_79
    Member
    Posted 4 years ago #

    Hmm, maybe mention my website is a good idea.
    http://www.farcows.nl

    I'll look this evening what the template files use, thanks.

  4. DJD_79
    Member
    Posted 4 years ago #

    Okay, from the index file:

    <div id="content" class="narrowcolumn">

    and later

    <div class="entry"><?php the_content('Read the rest of this entry »'); ?></div>

  5. DJD_79
    Member
    Posted 4 years ago #

    Hmmm, I've tried another thing:

    More does work on pages, but doesn't in posts...

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    How exactly are you adding the more tag? The code you've given for index.php should work with the more tag.

  7. DJD_79
    Member
    Posted 4 years ago #

    The code is working, but only for pages. Every blog on my site is a post and in a post it isn't working. Maybe a different php file?

    Inserting the code:
    Opening the php in Dreamweaver
    Adding this code by replacing the original:

    <?php global $more; $more = FALSE; ?>
    <?php the_content('Read the rest of this entry »'); ?>
    <?php $more = TRUE; ?>

    Save
    Upload the php with Filezilla
    Replace/overwite the original

    Gr. D

  8. esmi
    Forum Moderator
    Posted 4 years ago #

    Why are you adding that code?

  9. DJD_79
    Member
    Posted 4 years ago #

    'Cause it wasn't there.

    From a search (GIYBF)I came up with this solution, but it isn't a 100% solution. But why, is this the wrong one? For pages it works fine, but posts not...

    D.

  10. esmi
    Forum Moderator
    Posted 4 years ago #

    The correct code for Pages only is:

    <?php global $more; $more = 0; ?>
    <?php the_content('Read the rest of this entry »'); ?>

    It will not work for posts.

    How exactly are you adding the more tag?

  11. Rhand
    Member
    Posted 4 years ago #

    I am trying to get the more tag to work on pages as well and am writing about it here: http://wordpress.org/support/topic/424684?replies=4 . I have added code that now does show the read more tag, but it does not lead to the same page with all text

    <?php
    global $more;
    $more = FALSE;
    ?>
    <?php the_content("Lees de rest van deze pagina »"); ?>
    <?php $more = true; ?>
  12. DJD_79
    Member
    Posted 4 years ago #

    On a page I'm adding the more tag with the WYSIWYG editor.
    That works just fine, but in a post it isn't possible? Not at all?

    I will correct the php code esmi, thx.

  13. DJD_79
    Member
    Posted 4 years ago #

    Thanks all, I've found another way...
    Using a new php file just for my blog now.

Topic Closed

This topic has been closed to new replies.

About this Topic