Articles of previous

Styling Previous/Next Pages differently from Index

A friend of mine pointed me towards using child elements to style my index page so that I could have one loop and several different visual styles (a featured post, a smaller sub-featured post, and several smaller thumbnails). This is very helpful in that I can add posts and the existing posts will just flow […]

get_previous_post not working as expected

I have used get_previous_post to get the previous post of my custom post type. When I try that by doing $prevPost = get_previous_post(); var_dump($prevPost); I get a post object containing my previous post. So I then tried to set it up so that I could get the post data $prevPost = get_previous_post(true); if($prevPost) { $args […]

Add title for previous and next posts to Yoko Theme

Help! I want to change my “Previous” and “Next” post links to use the actual post titles. I have done all kinds of online research and code manipulation without any success. I am using the Yoko theme. Here is my current single.php code. What do I need to update it to be? My website is […]

Posts archive index pagination in a static page custom query

In WordPress, I have a page for News that is using a specific page template I created. This page is populated by news posts assigned to the news category. I need to show only two of the latest news posts on this page with Previous / Next links at the bottom if users want to […]

get_previous_post in same categories

I have a post in two categories, 1 and 2. I want to get the previous post in the two categories, 1 and 2. get_previous_post(true); With that code I’m getting the previous post in category 1 or 2. Any idea?

next and previous year month and day for archive page

is there php code for next and previous year,month,day link in archive page i just need something like that <-previous [year] next-> <-previous [month] next-> <-previous [day] next-> im creating a calendar and need those .

Previous & Next on Index Page broken

So the Next/Previuos on my index page is broken. It goes to page 2 but doesn’t refresh the posts. It will work on my categories and it will work on my posts but it just won’t work on the from page. Here’s my code: <?php get_header();?> <?php include(‘from.php’); ?> <div id=”content”> <div id=”content-main”> <?php if […]

Cache previous versions of website?

I’m working on a new site for a charity. They publish a printed magazine & we would like the website to always reflect the current issue of the magazine. So far I have a front page (home page) with excerpts from 3 most recent lead articles (wp posts). For layout purposes, the articles are categorized […]

Loop – how to get previous/next post for first/last post?

I have a simple loop for a JS slider, I want to display previous and next posts titles on my slide, but I can’t get previous post title on the first slide (because apparently first post have no previous posts): $prev_post = $loop->posts[$loop->current_post – 1]; // ALWAYS NULL FOR FIRST POST 🙁 $next_post = $loop->posts[$loop->current_post […]

How to make Next and Previous attached image navigation on the attachment page?

This question already has an answer here: Setting pagination for images attached to a post 1 answer