WordPress.org

Ready to get started?Download WordPress

Forums

<!--more--> teaser tag not working (22 posts)

  1. velocityboy
    Member
    Posted 9 years ago #

    In a new post I wrote:
    Testing
    <!--more-->
    more more more more more more more

    but in my main blog page it just reads:
    Testing
    more more more more more more more

    I click on the source code and this is what it says:

    Testing
    <a></a>
    more more more more more more more

    Here is the code in my index.php file

    <?php the_content('Read on...'); ?>

    Any suggestions? Thanks.

  2. velocityboy
    Member
    Posted 9 years ago #

    Hmm source code not showing above.

    In between the two lines it just has

    p a id="more-5" /a /p

    but with brackets. There is no text to where the more text link should be.

  3. zetazetapaf
    Member
    Posted 9 years ago #

    I've made 2 installations of wp in the same server, one have same problem and I don't know why...

  4. zetazetapaf
    Member
    Posted 9 years ago #

    <p><a id="more-5"></a><br />

  5. zetazetapaf
    Member
    Posted 9 years ago #

    I´ve been experimenting, but I don´t know PhP so:
    I´ve hacked template-functions-post.php, and I´ve replaced <a id="more-'.$id.'"></a>'.$content[1]; by <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>"; and now woks, but the entry extended display more_link_text :-(

    I don´t know why happens this, because on the other wp installation I´ve <a id="more-'.$id.'"></a>'.$content[1]; and works :-?

  6. zetazetapaf
    Member
    Posted 9 years ago #

    Sorry, doesn't work

  7. RustIndy
    Member
    Posted 9 years ago #

    The MORE tag won't work if you're only displaying a single post. This bug has been fixed in the current CVS version, and will also work properly in WordPress 1.5.1 when it's released.

  8. zetazetapaf
    Member
    Posted 9 years ago #

    Thanks

  9. velocityboy
    Member
    Posted 9 years ago #

    It started working by itself and now I know why!

    I experimented when displaying only a single post.

  10. jrgilby
    Member
    Posted 9 years ago #

    Is there some hack we can use until 1.5.1 is released?

  11. dherren
    Member
    Posted 9 years ago #

    Change line 177 of the wp-blog-header.php file from this:

    if (1 == count($posts)) {  

    to this:

    if ( is_single() || is_page() ) {

  12. krisandapril
    Member
    Posted 9 years ago #

    I don't have a .php file called "wp-blog-header.php"

    I only have these files:

    about.php
    comments.php
    footer.php
    header.php
    index.php
    sidebar.php
    templates.php

    I looked into both the header and the index files and there is no exact code like that. I used the ctrl+F function and looked for posts, but no luck finding that exact code which you describe. And yes, 'em using 1.5.

  13. krisandapril
    Member
    Posted 9 years ago #

    Ok, never mind. Found it. I'll see if it works.

  14. cordac
    Member
    Posted 9 years ago #

    There is a new version of the file that's handling the more-part.
    Go to the mosquito at wordpress and search for more.
    Info about the bug and just copy the whole php-text and replace yours with the new.

  15. angsuman
    Member
    Posted 9 years ago #

    @RustyIndy and @cordac
    "The MORE tag won't work if you're only displaying a single post. This bug has been fixed in the current CVS version"

    This is a bug? I thought it was a feature :)
    Why would you want to display "more" on single post? In single post mode I want them to see the full post. If I want to breakup I will use Page function.

    If you do *fix* this please provide a way for some of us to unfix this by providing an option. I like my *more* as it is now.

  16. angsuman: The bug isn't about single post "mode" (i.e. a post's permalink page) because, yes, there we do want to always see the whole post unless it is paged. The bug is that on any page where only one post happens to appear (i.e. a category or month page which only contains one post) the "more" was being ignored. Were you to upgrade to 1.5.1 once it comes out you won't have to worry about changing anything; it'll behave the way you want it to.

  17. angsuman
    Member
    Posted 9 years ago #

    Sounds good. So when is it coming?

  18. NuclearMoose
    Member
    Posted 9 years ago #

    "When it's ready." :)

  19. krisandapril
    Member
    Posted 9 years ago #

    Ugh, it was so easy to figure out how to change it. I can't believe I overlooked the file (what's wrong with me?)

  20. shadowbox
    Member
    Posted 8 years ago #

    Any idea why the <!--more--> tag would work in one entry, and then two entries later, doesn't work?

  21. Beel
    Member
    Posted 8 years ago #

    "Any idea why my car started yesterday but doesn't today?" Yeah, lots of ideas but too numerous to list. Either bring your car into the shop or give us some more information. link?

  22. yurivs
    Member
    Posted 8 years ago #

    Hello
    I have a blog with multiple authors. Some of them, whem they publish their posts, don't achieve to save the <!--more--> tag, because it disapear. (They are using the simple editor.) But this is not happening in my PC. The tag "more" works to me. Why? We use wordpress 2.0.
    Thank's
    Yuri

    _____
    http://blog.karaloka.net

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.