Support » Themes and Templates » Complete custom Next and Previous links

  • Resolved nathanbunn

    (@nathanbunn)


    Is it possible to have completely customised Next and Previous links, as in more so than currently available? I saw this post on one of the many MSN blogs and noticed the Next and Previous tabs. I absolutely love them and would love to use something like them in my blog template. Is it possible to do this? Would I still be able to hide my links if there is no Next or Previous post? Please say yes, I would love for these to be doable in WordPress.

Viewing 4 replies - 1 through 4 (of 4 total)
  • It’s certainly possible to completely re-style the next/previous links using CSS. There are also some page navigation plugins that you might want to have a look at.

    And, yes, the links should not be displayed in there are no Next or previous pages – though this might depend upon your CSS skills.

    Thread Starter nathanbunn

    (@nathanbunn)

    Do you know of any tutorials I could look at or anywhere in the Codex it says how to do this? So far, all I have found is http://codex.wordpress.org/Next_and_Previous_Links#The_Next_and_Previous_Posts

    Not that I know of but you could try simply googling for ideas. It’s not really a WordPress thing but more of a styling/CSS thing.

    Thread Starter nathanbunn

    (@nathanbunn)

    I have found the solution. Thanks to your comment, esmi, and a little testing on my part, it can simply be done with CSS and the WordPress tags. It will display just as a normal Next or Previous link, no extra special CSS skills required. 😉

    All I probably need to say (and WordPress could do with adding on their Codex) is you can add HTML inside the next_post() and previous_post() tags. CSS is just applied to it as you would a normal HTML element. I built my arrows in another page, made them look right and copied the code into their appropriate place. Since I used single quotes ( ‘ ) to define the variables in the PHP, double quotes ( ” ) can be used to define the HTML attribute values as normal, and the % works just to add the actual link, as normal. No idea how to get the link to wrap around the entire HTML code, but I will leave it at that. It works this way, so I am happy.

    Thanks for your help. I don’t think I would have tried had you not said that it was just HTML coding.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Complete custom Next and Previous links’ is closed to new replies.