Do I need a programmer or plugin?

6 replies
I've got a theme, that at the bottom of each post it displays a left and right navigation for the next or previous post in that category.

It sounds like a good idea to prevent pages being on a little island of their own when they shouldn't be.

My question is on another theme that doesn't have this, do I need a programmer or is there a plugin that will do this for me?

Thanks.
#plugin #programmer
  • Profile picture of the author bgmacaw
    Here's the code...

    This goes in single.php. I usually put it just below the comments section.

    PHP Code:
    <div class="navigation">
    <span class="previous"><?php previous_post_link('&laquo; %link'); ?></span>
    <span class="next"><?php next_post_link(' %link &raquo;'); ?></span>
    </div>
    In your styles.css if this isn't already there...

    HTML Code:
    .navigation {
    	margin: 15px 0;
    	}
    .previous {
    	float: left;
    	width: 47%;
    	}
    .next {
    	float: right;
    	width: 47%;
    	}
    EDIT: That doesn't do it by category though, just chronological. There is a parameter on the previous_post_link for category though but I haven't tested it out.
    {{ DiscussionBoard.errors[865661].message }}
  • Profile picture of the author stevetp
    Sorry to jump on your thread but its on a similar topic. I was wondering about the related posts section that appears at the bottom of some posts (on some themes). I believe this is based on the tags that you attach to the posts.

    Is there a plug in or section of code you can add to any blog to do this.
    {{ DiscussionBoard.errors[865679].message }}
    • Profile picture of the author Intrepreneur
      Originally Posted by stevetp View Post

      Sorry to jump on your thread but its on a similar topic. I was wondering about the related posts section that appears at the bottom of some posts (on some themes). I believe this is based on the tags that you attach to the posts.

      Is there a plug in or section of code you can add to any blog to do this.
      Theres a "Related Posts Plugin" that I have.

      Interesting with the coding above, that will certainly work.. thanks and..

      Nice answer.

      I also guess you'd know a bit more if I were to ask you?

      As I need a breadcrumb naviagtion too, problem is that when trying to use one I can't get this Nav Xt to exclude itself on category pages and keeps breaking my design there.
      {{ DiscussionBoard.errors[865724].message }}
      • Profile picture of the author bgmacaw
        Originally Posted by Intrepreneur View Post

        As I need a breadcrumb naviagtion too, problem is that when trying to use one I can't get this Nav Xt to exclude itself on category pages and keeps breaking my design there.
        I've not used a plugin like this since I usually only have a single category per blog although I've tried a few of them that had problems because of the way they inserted themselves into the WordPress loop and interacted with the themes I use. I have seen this built into some themes and this seemed to work OK.
        {{ DiscussionBoard.errors[866246].message }}
        • Profile picture of the author Intrepreneur
          Originally Posted by bgmacaw View Post

          I've not used a plugin like this since I usually only have a single category per blog although I've tried a few of them that had problems because of the way they inserted themselves into the WordPress loop and interacted with the themes I use. I have seen this built into some themes and this seemed to work OK.
          I took out the usual string that is used at the top of posts and repacled it with the breadcrumb navigation.

          It's pretty much an experiment more than anything, to see if it will improve my site structure.

          I think a few more tweaks and i'll be happy it's the best that can be done.
          {{ DiscussionBoard.errors[866274].message }}
    • Profile picture of the author bgmacaw
      Originally Posted by stevetp View Post

      Sorry to jump on your thread but its on a similar topic. I was wondering about the related posts section that appears at the bottom of some posts (on some themes). I believe this is based on the tags that you attach to the posts.
      I use Yet Another Related Posts Plugin.
      {{ DiscussionBoard.errors[866238].message }}

Trending Topics