Title: Next Post problems
Last modified: August 18, 2016

---

# Next Post problems

 *  Resolved [tongueandcheek](https://wordpress.org/support/users/tongueandcheek/)
 * (@tongueandcheek)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/next-post-problems/)
 * I followed the Template Tags suggestions and tried using their code but I’m not
   getting the results I want and I don’t want to have to install a plug-in.
 * The code on the WordPress Support pages looks like this essentially:
 * <div class=”navigation”>
    <div class=”alignleft”><?php previous_post(‘« %’, ”,‘
   yes’); ?> </div> <div class=”alignright”> <?php next_post(‘% »’, ”, ‘yes’); ?
   ></div> </div> <!– end navigation –>
 * but no matter what I do I can’t get the arrows on the next_post() to show up 
   on the right and as part of the link. I also can’t get both of these links to
   show up on the same line short of scripting up something that specifically nudges
   it up 20px.
 * Does anyone have an example of what I want, two links on the same line aligned
   to the left and right? Or thoughts on how to make this work? I’ve exhuasted all
   the possibilities I can think of which includes forced floating or text-alignment.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/next-post-problems/#post-365016)
 * Could you clarify what it was you were trying to do?
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/next-post-problems/#post-365017)
 * My next and previous code looks like this:
 * `<div class="navigation">
    <div class="alignleft"><?php previous_post_link('&
   laquo; %link') ?></div> <div class="alignright"><?php next_post_link('%link &
   raquo;') ?></div> </div>
 * And then I use floats to make each class align to the proper side. You’ll need
   to make sure the very next element has `clear: both;` set on it, or it will appear
   in between the two.
 *  Thread Starter [tongueandcheek](https://wordpress.org/support/users/tongueandcheek/)
 * (@tongueandcheek)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/next-post-problems/#post-365336)
 * that worked quite well… now for the second part of the problem, how to get it
   so that the arrows are actually part of the link?
 * is this possible?
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/next-post-problems/#post-365419)
 * It’s always a good idea to get in the habit of checking the codex:
    - [http://codex.wordpress.org/Template_Tags/next_post](http://codex.wordpress.org/Template_Tags/next_post)
    - [http://codex.wordpress.org/Template_Tags/previous_post](http://codex.wordpress.org/Template_Tags/previous_post)
 * 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Next Post problems’ is closed to new replies.

## Tags

 * [alignment](https://wordpress.org/support/topic-tag/alignment/)
 * [arrow](https://wordpress.org/support/topic-tag/arrow/)
 * [left](https://wordpress.org/support/topic-tag/left/)
 * [next](https://wordpress.org/support/topic-tag/next/)
 * [right](https://wordpress.org/support/topic-tag/right/)

 * 4 replies
 * 2 participants
 * Last reply from: [maerk](https://wordpress.org/support/users/maerk/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/next-post-problems/#post-365419)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
