Title: Cannot include navigation in single posts
Last modified: August 20, 2016

---

# Cannot include navigation in single posts

 *  [insurgenesis](https://wordpress.org/support/users/insurgenesis/)
 * (@insurgenesis)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/cannot-include-navigation-in-single-posts/)
 * Hi, I’m using a **child theme** for **twenty eleven** but thought this would 
   be a more general issue.
 * I’ve managed to include custom navigation for my category posts by calling a 
   function like this `<?php blah_pagination(); ?>` from within the category.php
   template.
 * The function itself resides in functions.php and looks like this: [http://pastebin.com/G1TNrTnv](http://pastebin.com/G1TNrTnv)
 * For some reason it cannot be called in the same way from the single post (single.
   php and content-single.php) template.
 * Is there another, improved way to do this? Why won’t it work?
    My php skills 
   are limited and I’m done guessing…

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/cannot-include-navigation-in-single-posts/#post-3016155)
 * what do you want to do different than what Twenty Eleven does already with the
   code in single.php:
 *     ```
       <nav id="nav-single">
       						<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
       						<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ) ); ?></span>
       						<span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></span>
       					</nav><!-- #nav-single -->
       ```
   
 *  Thread Starter [insurgenesis](https://wordpress.org/support/users/insurgenesis/)
 * (@insurgenesis)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/cannot-include-navigation-in-single-posts/#post-3016161)
 * It’s very confusion when a single post is presented outside the cycle in which
   the posts belonging to a category are arranged.
 * In my case, single posts were presented differently from posts in categories (
   although ALL the posts _are_ in categories).
 * To counteract this I included the category name above single posts and confined“
   next” and “previous” to only navigate in the category to which a single post 
   had been assigned to.
    But “previous” and “next” needed more options like “page
   1 of 1” because it felt too limiting.
 * I then found a function (above link) that works for category.php but not for 
   posts generated with the singles. Now the challenge is to get some consistence
   between category- and single posts navigation.
 *  Thread Starter [insurgenesis](https://wordpress.org/support/users/insurgenesis/)
 * (@insurgenesis)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/cannot-include-navigation-in-single-posts/#post-3016352)
 * alchymyth, do you understand what I mean?
    The navigational style described above(
   before alternative solutions were introduced) is how it ended up to be in my 
   child theme. Although I realise Twenty Eleven comes with its own navigation solutions
   I just needed a little more. It’s important to note that I did not do away with
   it either but the idea was to build on it. Anyway I hope I’m not being too particular.
   If I should be posting this in another forum, please let me know.
 *  Thread Starter [insurgenesis](https://wordpress.org/support/users/insurgenesis/)
 * (@insurgenesis)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/cannot-include-navigation-in-single-posts/#post-3016611)
 * [@alchymyth](https://wordpress.org/support/users/alchymyth/), maybe I haven’t
   yet responded to your question:
 * > what do you want to do different than what Twenty Eleven does already with 
   > the code in single.php?
 * I needed a way to show navigation options more explicitly.
    The navigation I 
   used not only shows “next” and “previous” but also includes “first/last”, as 
   well as a numeric pagination 1,2,3 etc.
 * I have tried to [explain this](http://wordpress.org/support/topic/twenty-eleven-set-all-posts-to-use-one-navigation-template?replies=22)
   elsewhere on the forum. The original OP question was:
 * > How can I set ONE template to be used for ALL posts – such as category.php 
   > instead of using multiple ones?
 * I don’t understand the need for the single template. I guess I need a more static
   feel. Although I got navigation working for the category posts only, the real
   issue is that single posts seem to fall outside the cycle.
    Do you know what 
   I mean?
 * I certainly don’t expect answers relating to custom navigation implementation
   but it would be beneficial to learn more about the inner workings of that “cycle”.
   And I realise there’s a semantic difficulty in describing this to someone, my
   apologies. It would be more reassuring to know that the cycle issue is real than
   simply solving the navigation.

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

The topic ‘Cannot include navigation in single posts’ is closed to new replies.

## Tags

 * ["function call"](https://wordpress.org/support/topic-tag/function-call/)
 * [custom navigation](https://wordpress.org/support/topic-tag/custom-navigation/)
 * [single post](https://wordpress.org/support/topic-tag/single-post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [insurgenesis](https://wordpress.org/support/users/insurgenesis/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/cannot-include-navigation-in-single-posts/#post-3016611)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
