WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Archives issue (20 posts)

  1. kohaku
    Member
    Posted 5 years ago #

    I have a copy of WordPress installed in another folder on my server for theme testing purposes.

    However, when I go to test the archives, I'm taken to my main sites archive pages. Am I missing something in my .htaccess file?

    My testing WP install is a mirror to my main install except for the .htaccess.

    Any help would be greatly appreciated.

  2. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    If you have a local testing install of WordPress, you should make sure that the WordPress and Blog URI in your Admin panel are set to your local installation.

    If you're moving the database back and forth, you definitely need to make some changes to your MySQL file beforehand to get it to work correctly.

  3. kohaku
    Member
    Posted 5 years ago #

    The WP install is on a completely separate database and the WP/Blog URIs are both pointing to my my testing install.

    I'm not moving the databases back and forth. I'm just moving theme files back and forth.

  4. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    You might try rebuilding the .htaccess on your local machine.

    Are you moving it as well as the theme files?

    Otherwise, I'd recommend digging into your template and seeing exactly how the links for Archives are constructed.

  5. kohaku
    Member
    Posted 5 years ago #

    Just moving the theme files.

    I've already gone over the theme files, nothing there to suggest that the archives should link to the main archives.

    I've tried rebuiling the .htaccess with no luck.

  6. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    kohaku,

    I'm sorry, I didn't read carefully and thought you had an install on a local dev machine and the live install on the server. Instead, both of your installs are on your server.

    Can you post a link for us to look at?

    Also, if you're referring to a list of archives in the sidebar, you may want to post the source of the sidebar.php (or other appropriate) file.

  7. kohaku
    Member
    Posted 5 years ago #

    Sorry, I guess I should have made it more clear. I do have an install on a local dev, but I know the archives don't work on it.

    Anyway, my testing is located at http://infragilis.net/test/wordpress.

    The archives are set to be at http://infragilis.net/test/wordpress/archives. When I go to check, it reverts to http://infragilis.net/archives.

  8. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Hey kohaku,

    I've had a look and it looks like all of your nav links in your horizontal nav point back to the 'root' WP install.

    Can you post the code for this navigation:

    <div id="navigation">
    
    	<div class="menu">
    		<div class="block"><a class="menu" href="http://www.infragilis.net">blog</a></div>
    
    		<div class="block"><a class="menu" href="http://infragilis.net/about">about</a></div>
    		<div class="block"><a class="menu" href="http://infragilis.net/domain">domain</a></div>
    		<div class="block"><a class="menu" href="http://infragilis.net/about/booklist">booklist</a></div>
    		<div class="block"><a class="menu" href="http://infragilis.net/archives">archives</a></div>
    		<div class="block"><a class="menu" href="http://infragilis.net/contact">contact</a></div>
    		<div class="block"><a class="menu" href="http://colourlovers.com/lover/infragilis">colour&hearts;</a></div>
    
    		<div class="block"><a class="menu" href="http://feeds.feedburner.com/infragilis">rss</a></div>
    	</div> <!-- end menu -->
    
    </div> <!-- end navigation -->

    It's quite obviously linking back to the 'root' WP install, but it would be helpful to see the file, or code, that's generating this menu.

  9. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Curious: did you create this theme, or download it?

  10. kohaku
    Member
    Posted 5 years ago #

    Since the links are hard-coded into the theme, I didn't change them for the testing stage. I just manually type in the address to the archives.

    I created it. Thanks for asking.

  11. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Since the links are hard-coded into the theme, I didn't change them for the testing stage. I just manually type in the address to the archives.

    That'll do it. If the links are hard-coded instead of using template tags, they're 'absolute,' if that makes sense. I could put your theme on my blog and the links would still go to yours.

    I created it. Thanks for asking.

    Looks good!

  12. kohaku
    Member
    Posted 5 years ago #

    That'll do it. If the links are hard-coded instead of using template tags, they're 'absolute,' if that makes sense. I could put your theme on my blog and the links would still go to yours.

    But since I'm manually typing in the archives address, I'm not exactly understanding how those links would override. I'm not clicking on them, I'm just trying to make it easier on me for when I upload it to my root install.

  13. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    But since I'm manually typing in the archives address, I'm not exactly understanding how those links would override. I'm not clicking on them, I'm just trying to make it easier on me for when I upload it to my root install.

    Maybe I'm misunderstanding.

    If you've manually typed in the Archives link in your template like so:

    <div class="block"><a class="menu" href="http://infragilis.net/archives">archives</a></div>

    . . . and you aren't changing this line between your root install and your new dev install, then it will always point to your root install.

    Would it be possible for you to cut & paste the code from your new theme's navigation here? The theme you're using on http://infragilis.net/test/wordpress/

  14. kohaku
    Member
    Posted 5 years ago #

    It's the same coding that you posted earlier.

    What I mean is that I'm not clicking on the archives link on the page to go to the archives.

    I'm manually typing in the address to the archives in my browser's address bar to test what the archives look like, but my root install overrides the test site.

    Does that make more sense.

  15. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Yup. Perfect sense.

    Could you post the contents of you .htaccess file in your test install?

    On a side note, did you do the sketch (girl with "Speaking is not Communicating" shirt) used on your error page?

  16. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Oops, site hung; double post.

  17. kohaku
    Member
    Posted 5 years ago #

    SecFilterEngine Off
    SecFilterScanPOST Off

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    And my best friend drew that. I can ask her how much she charges for commission, if you'd like.

  18. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    kohaku,

    You might backup your existing .htaccess in your test install and try this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /test/index.php [L]
    </IfModule>

    And my best friend drew that. I can ask her how much she charges for commission, if you'd like.

    Please. You, or your friend, can contact me directly through my site. I have an illustration job I'd really like help with. :)

  19. kohaku
    Member
    Posted 5 years ago #

    I got it figured out. WP wasn't/couldn't writing a .htaccess file or editing it when I changed permalink structure.

    I deleted the .htaccess I had and edited vars.php as instructed in the codex.

    I'll have her contact you when I see her next!

  20. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Glad you got it sorted.

    Thanks for passing along my info. :)

Topic Closed

This topic has been closed to new replies.

About this Topic