The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Next and previous page link URL problem (17 posts)

  1. SteveandDawn
    Posted 10 years ago #

    Site URL: http://www.steveanddawn.com/

    Click on next page link at the bottom of the home page and the URL changes to this: http://www.steveanddawn.com/page/2/

    Because of the URL change I loose my webcomic at the top of the page. I noticed if the following url is used the webcomic does not disappear: http://www.steveanddawn.com/index.php?paged=2

    I'm not sure how to fix this and I could use some help.

    My permalinks are: http://www.steveanddawn.com/2006/08/19/sample-post/

    My .htaccess is:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    Another option is that after the home page there would be no trace of the webcomic as there is now.

    Thanks for any help.


  2. moshu
    Posted 10 years ago #

    Do you have a home.php and and index.php in your theme?

  3. SteveandDawn
    Posted 10 years ago #

    Yes, there is a index.php

  4. moshu
    Posted 10 years ago #

    I know there is an index, otherwise it wouldn't work. My question was aimed to whether you have a home.php, too?

    EDIT. And the next question will be whether you use any page-to-front, hompege and similar plugins?

  5. SteveandDawn
    Posted 10 years ago #

    DOH! Sorry about that. No, there is no home.php page.

    The pluggins I'm using are:

    Democracy (Ajax polling plugin By Andrew Sutherland.)
    WordPress Database Backup

  6. SteveandDawn
    Posted 10 years ago #

    I also wanted to say thank you Moshu for taking the time to help, it's very much appreciated.

  7. SteveandDawn
    Posted 10 years ago #


    Did you think of any way to fix this?



  8. moshu
    Posted 10 years ago #

    The only thing I can think of to use the "is_paged" conditional in your Loop - but I am not a coder.

    I assume that thing is shown by using an "is_home" conditional, so you should add "and if is_paged".

  9. SteveandDawn
    Posted 10 years ago #

    Hi Moshu,

    I can't find the is_home in any of my files.

    I'm stumped,


  10. Do you have an archive.php in your theme?

    That's "archive" singular, not "archives" plural.

    If so, then you may need to add the code that displays the comic to that as well. The archive page is called for, well, various kinds of archive pages.

  11. SteveandDawn
    Posted 10 years ago #

    Hi Otto42,

    I doubled checked and I don't have an archive.php for the theme. I do have an archive.php for my cartoons but it is not connected to the theme.

    Now with that said, the code I use in my main page uses an absolute path to my cartoons and not a url based path. I'm not a php coder so I'm not sure how to change the script with out messing up it's calls.

    I'm beginning to think that the absolute path is what causes the problem.



  12. AHHHH! That's your problem. You're using a relative path for the image, not an absolute path.

    See this code on your main page:
    <img src="cartoons/08-22-2006.jpg">

    Well, when your URL changes to the /page/2 thing, that relative link is now broken. You need to change your comic code to use a full, absolute, path to your images. Like this:
    <img src="http://www.steveanddawn.com/cartoons/08-22-2006.jpg">

    That will fix your issue. If you don't want to specify the entire URL (maybe you have more than one? maybe it changes from time to time?), then you could specify the relative path from the root instead. Like this:
    <img src="/cartoons/08-22-2006.jpg">
    Note the leading slash in the src attribute.

  13. SteveandDawn
    Posted 10 years ago #

    Hi Otto42,

    I tried that, I think you're dead on though. However, the way the script works, this is what it calls for:

    <!-- $comic_path = the absolute path to your comic files, NOT the URL ask your webhost for this info, if you don't have it.


    So it would take a whole reworking of the script and I'm not a coder. That's why I was hoping to find a work around on the way WordPress treats the /page/2 thing.

  14. Steve: No, no, that's not the same thing at all. That $comic_path is not where your problem is.

    It probably wouldn't be difficult to change (just add your URL in the right place, most likely), but without seeing the code itself, I cannot be more specific than that.

  15. SteveandDawn
    Posted 10 years ago #

    Otto42: I changed my permalinks to the default and it is all working now. The default url now is: http://www.steveanddawn.com/index.php?paged=2
    instead of:

  16. archshrk
    Posted 9 years ago #

    Can't help with this issue but one of the comments helped me. Adhesive was causing a conflict with the previous - next navigation on my site. Affected all themes. It's all better now - THANKS!

  17. dlakme
    Posted 9 years ago #

    Please please help me. I have the same problem.


    Yes, I do have a "home.php." It happened once in the past, so I disabled some plugins and it worked again. The problem happened once more, again I fixed. However, after the third time, I don't know what to do with it.

Topic Closed

This topic has been closed to new replies.

About this Topic