More tag not working

  • Unknown's avatar

    Hello All! Hope your day or night is going well. This is my first on a forum – EVER – I think. Wow – I guess that’s what happens when we cannot open the hood, lol. So my problem is that I cannot split my post text to create an excerpt via the <!–more–> methods as detailed on:

    https://en.support.wordpress.com/more-tag/

    I have tried using the visual editor button and the html editor using the <!–more–> comment tag. When I click the visual editor button I get “————-more————-” as expected; when I use the html editor I use <!–more–>. When I click publish and view the post loop on my site I do not get excerpts where I placed my “more” dividers/splitters.

    Given:
    Wordpress.com site: wptester0.wordpress.com
    Post loop: wptester0.wordpress.com/articles
    Theme: Independent 2 (also tried Libre 2 thinking perhaps it was a theme issue – and maybe it is)

    Note: if you take a look at the source (ctrl+u) from my article “EX 0.0.2” and then search (ctrl+f) “<!—more–>” you will see it in my entry-content div. You will also notice the first “more tag” has an empty span element with an id of more-98.

    This tag appears in my posts “EX 0.0.1” and “EX 0.0.0” arbitrarily generated via html or visual editor throughout.
    Interesting… I just checked the source for “EX 0.0.1” and “EX 0.0.0” and have discovered that there are NO <!–more–> tags inside the entry-content div. I checked my posts via the dashboard and the “more” splits are there. So for some reason whatever generates the split is not working on my site – perhaps a function within functions.php. In any case this is looking like something I do not have access to.

    If we can’t solve this it’s no biggie. My blog is just an experimental tool to see how far I can push a free WordPress.com site so that I can learn the system. Hopefully this can be solved and in doing so help others with similar issues.

    Thanks for the help, appreciate it!

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    I can see the Continue Reading buttons your theme adds when the more tag is used when I view your posts page at https://wptester0.wordpress.com/articles/

    When I click publish and view the post loop on my site I do not get excerpts where I placed my “more” dividers/splitters.

    Do you mean the preview that appears immediately after you publish? That preview shows the single-post view of the post, and you won’t see where the more-tag was added in that view. The excerpt-version of the post only appears in the main posts page on the site, as it’s purpose is to make that page less cluttered and to encourage visitors to click through to the post itself, rather than just reading the posts on the main page.

    I hope that clarifies things, but let me know if you have any more questions about this.

  • Hang on. I just looked again, and I see you have multiple More tags in your test post. That won’t work. That tag can only be used once per post.

    You also have your site set to use automatic excerpts, which might be overriding the more-tag. That option is at My Site ->Customize ->Content Options.

  • Unknown's avatar

    Quick clarification of @kokkieh’s 1’st response for other readers: post loop = main posts page. May help if you are coming from a WordPress.org install.


    @kokkieh
    , thanks for your diligence. Your hunch about the content options overriding the “more” tag were correct! I have changed “Post excerpt” radio button to “Full Post” radio button. I am now getting the desired output : )

    Note: multiple “more” tags on a single post do not seem to throw errors or unexpected behavior. At the moment desired behavior is shown regardless of the number of “more” tags used on a single post. The function probably looks for the first instance of the tag and ignores the rest.

    I can now continue with “more” tag experiments, YAY! I am looking to see where and how this functionality breaks – just wasn’t expecting it so early on. LOL. Thanks for helping me establish a concrete baseline for my experimentation. I’ll be posting my findings on my blog over the next few days, time permitting.

    If anyone else runs into similar problems I hope this conversation and/or my research helps. Thanks again @kokkieh!

  • Glad I could help :)

    Note: multiple “more” tags on a single post do not seem to throw errors or unexpected behavior.

    Not always, but it can. It can also cause issues if any additional formatting is applied to the more-tag, so watch out for that. For the best experience (though you say you’re trying to break it), always make sure to add the tag on its own line, and make sure no other formatting like text alignment or styling like bold or italics are active. It will work 9 times out of ten, and go completely haywire the one time :)

  • The topic ‘More tag not working’ is closed to new replies.