WordPress.org

Ready to get started?Download WordPress

Forums

Next and previous page link URL problem (17 posts)

  1. SteveandDawn
    Member
    Posted 7 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/
    /%year%/%monthnum%/%day%/%postname%/

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

    # 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.

    Steve

  2. moshu
    Member
    Posted 7 years ago #

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

  3. SteveandDawn
    Member
    Posted 7 years ago #

    Yes, there is a index.php

  4. moshu
    Member
    Posted 7 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
    Member
    Posted 7 years ago #

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

    The pluggins I'm using are:

    Akismet
    Democracy (Ajax polling plugin By Andrew Sutherland.)
    podPress
    WP-ContactForm
    WordPress Database Backup

  6. SteveandDawn
    Member
    Posted 7 years ago #

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

  7. SteveandDawn
    Member
    Posted 7 years ago #

    moshu,

    Did you think of any way to fix this?

    Thanks,

    Steve

  8. moshu
    Member
    Posted 7 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
    Member
    Posted 7 years ago #

    Hi Moshu,

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

    I'm stumped,

    Steve

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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
    Member
    Posted 7 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.

    Thanks,

    Steve

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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
    Member
    Posted 7 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.

    YOU MUST EDIT THIS VARIABLE OR THE SCRIPT WILL NOT WORK -->

    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. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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
    Member
    Posted 7 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:
    http://www.steveanddawn.com/page/2

  16. archshrk
    Member
    Posted 7 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
    Member
    Posted 7 years ago #

    Please please help me. I have the same problem.

    http://www.praguebuzz.com.

    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