I have found that because of the floating style that is applied to both of these, sometimes you need to put a non-breaking space between them:
Hmmm. Looks like your problem might that the tags have been rewritten. Try using this:
<?php previous_post_link('« %link') ?>
<?php next_post_link('%link »') ?>
Yea, i have tried that too, still did not work. Here is the code, maybe someone can see what i am doing wrong:
code
< ? php endwhile; ? >
<span class=”next”>< ? php previous_posts_link(‘« %link’) ?></span>
<span class=”previous”>< ? php next_posts_link(‘%link »’) ? ></span>
</div>
< ? php else : ?>
< h2 class=”center”>Not Found< /h2>
<p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
< ? php include (TEMPLATEPATH . “/searchform.php”); ? >
< ? php endif; ? >
/code
I have included the top of the code to the bottom of the code to make sure i am placing the next/previous php in the right spot of the index.php file
EDIT-the link is http://www.mytimewithgod.net if someone wanted to look at the source. I also made entries in my css file for the span
Can anyone help with this?
First try fixing the spacing in the php code and also add a semi-colon to the end:
<?php previous_posts_link(‘« %link’); ?>
<?php next_posts_link(‘%link »’); ?>
Next, try these functions instead:
<?php previous_post(‘« %link’); ?>
<?php next_post(‘%link »’); ?>
You could also try this single function to replace the two above:
<?php posts_nav_link(‘ ‘,’« %link’,’%link »’); ?>
And lastly you could try removing all the above and instead replacing it the wp-pagenavi plugin, which does a much better job than any of the above functions.
Next, try these functions instead:
<?php previous_post(‘« %link’); ?>
<?php next_post(‘%link »’); ?>
WRONG advice:
1. they are deprecated
2. they were for single post view, not for index (or other multipost view pages)