• Resolved jayp

    (@jayp)


    Having major frustrations. I’ve setup wordpress as a CMS. Everything is almost perfect.

    The blog is contained at domainname.com/blog. I’ve used the code given in the codex (see here) to achieve this. You basically make a template file called blog.php and then create a page named blog and assign it that template file. This page simply calls the posts (blog) index. The code is short and sweet — see the URL I provided.

    The only problem is that on this page, the_content() is not honoring the MORE quicktag and is instead showing the whole post.

    The archive pages (both category and date based archives) are showing the MORE link just fine.

    Has that code that I got from the codex become outdated with new releases of WordPress? What’s the reason that the_content() doesn’t recognize needing to include the MORE link?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Consider trying the technique described in Giving_WordPress_Its_Own_Directory.

    Thread Starter jayp

    (@jayp)

    If that worked, one of the biggest problems is that I use a script to update a handful (and growing) of WP sites when new updates are released. Having the blog in another directory would mean the script wouldn’t work or would need to be modified. I much prefer the simplicity of having all the sites I manage the same…

    Surely I can get it working based on that script in the codex? It’s so close, I just need to understand why the_content() isn’t printing out the MORE link.

    Thread Starter jayp

    (@jayp)

    A solution!

    So as I wrote that last comment, I immediately got to thinking that the problem might be with the query_posts() function in that code from the codex. Turns out it was.

    From the Codex on query_posts() (see here):

    If you want to use the Read More functionality with this query, you will need to set the global $more variable to 0.

    So I used this code directly after my query_posts() call and it worked.

    global $more;
    $more = 0; // set $more to 0 in order to only get the first part of the post

    Can we please update the codex where it describes how to place your blog in a “virtual” non-root directory? Surely others have had difficulty with this too. Updating the Codex would be appropriate!

    Please feel free to make that change in Codex. Just create a user then edit that page.

    Thanks for the feedback!

    Thread Starter jayp

    (@jayp)

    It’s been a learning day. I’ve changed the codex with this information. We’ll hope nobody deletes it for no reason.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cant see MORE link with blog in non-root folder’ is closed to new replies.