• Resolved danaldinho

    (@danaldinho)


    Hey,

    At the bottom of my blog ( https://www.lilwaynehq.com ) the navigations links (previous and next) do not work.

    When you click on them, it just brings up the 404 page ??

    Anyone know what the problem is and how I can fix them?

    The code I am using is:

    <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    		</div>

    Thanks ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • they work for me.

    Thread Starter danaldinho

    (@danaldinho)

    Sorry, I should of been clearer.

    They work, but they display the first pages posts again ??

    Instead of displaying the next 5 posts etc.

    ok, what happens when you switch to the default theme?

    Thread Starter danaldinho

    (@danaldinho)

    It works when I use the default theme.

    well then take that theme back to the guy who made it, or fix it yourself?

    compare the default theme to the custom theme. whats different? Put on your thinking cap …

    Thread Starter danaldinho

    (@danaldinho)

    Obviously I have tried looking myself.

    The code is exactly the same as I posted above ^

    So I am wondering what other files I need to edit… like would it be some functions in the includes I need to edit.

    Thread Starter danaldinho

    (@danaldinho)

    Ok, I contacted the people who made the theme and they told me that it is something to do with my wordpress files.

    So, could someone please point me in the right direction to see why these links aren’t working. Like what files should I check and see if they are similar from a theme that has the links working to my theme.

    Thanks.

    No it’s not your WordPress files, that’s clearly evident from the fact it works when switching theme…

    I can take a stab in the dark and guess by saying that the problem lies in some custom query in the theme files…

    Do you have a latest posts query or something like that just before those links? Or maybe somewhere else in theme file?

    Thread Starter danaldinho

    (@danaldinho)

    I thought it might be something to do with the queries, but I just wasn’t 100% sure.

    I looked and I think it will be something do with this

    <?php
    	include(TEMPLATEPATH . '/includes/version.php');
    
    	$the_query = new WP_Query('cat=-'. $ex_feat . ',-' . $ex_vid . ',-' . $ex_aside . '&showposts=' . $showposts . '&orderby=post_date&order=desc');
    	$wp_query->in_the_loop = true; // Need this for tags to work
    	while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
    ?>

    What do you think? and this code was at the very top of my file.

    Thanks ??

    It could very well be related…

    Only way to know is to test, remove/modify, test, rinse and repeat…

    Thread Starter danaldinho

    (@danaldinho)

    I tried removing it and brings up an error on the blog.

    I do think I need that piece of code, but I will just have to modify it.

    But I have no idea what to add for the prev and next links.

    So could someone help me out with that ??

    Thank you.

    I’d imagine it’s a matter of ensuring your previous and next code is within the same loop as the post/page being displayed…

    Otherwise the links are sort of saying “Previous/Next post based on what, we don’t know where we currently are..”

    I could be wrong…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘My navigation’s links are linking incorrectly’ is closed to new replies.