The MU forums have moved to WordPress.org

Problem with blog doubling the previous_post_link and next_post_link (7 posts)

  1. simplestation
    Member
    Posted 16 years ago #

    If you scroll to the bottom of this page:
    http://tmcyouth.com/blogs/articles

    You will see a button for going to "next posts" but the URL is all wrong. It outputs...

    /blogs/articles/blogs/articles/page2

    when it should be:
    /blogs/articles/page2


    <div>
    <div class="fL"><?php previous_posts_link('<img src="/images/icons/blog_previous.gif" alt="Previous 10 Entries" />') ?></div>
    <div class="fR"><?php next_posts_link('<img src="/images/icons/blog_next.gif" alt="Next 10 Entries" />') ?></div>
    </div>

    can anyone lend me a hand? Thanks so much!

  2. simplestation
    Member
    Posted 16 years ago #

    Nevermind I fixed it by exporting the XML, and then deleting the blog, creating a new blog, and then importing the XML again. Not sure what happened here.

  3. drmiketemp
    Member
    Posted 16 years ago #

    We like blaming stuff like that on SixApart gremlins. :)

    Glad you got it working though.

    edit: Just realized that you've got a subdirectory install. Maybe an issue with that as occasionally an issue raises it's head with that install. If it occurs again, I'd raise the issue up on trac.

  4. simplestation
    Member
    Posted 16 years ago #

    Well I woke up this morning and it was back to its antics. The issue clearly can be seen at the bottom here:

    http://tmcyouth.com/blogs/healing

    Argh!!!!

  5. SteveAtty
    Member
    Posted 16 years ago #

    Look in your link-template.php file.

    I had a similar problem with my 'previous pages' links going wrong in that the doubled up the blog name. I commented out line 437 which is $home_root = trailingslashit($home_root);

    So you might have similar problem to me. I'm also running in subdirectories

  6. simplestation
    Member
    Posted 16 years ago #

    Thanks that really did the trick. Why is that code even there? Very odd.

  7. SteveAtty
    Member
    Posted 16 years ago #

    Maybe its needed for subdomains - not really sure. I guess we'd need to see if someone with a subdomain install is willing to comment that line out and report back

About this Topic

  • Started 16 years ago by simplestation
  • Latest reply from SteveAtty