The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
18 views

Loop Wordpress Next and Previous Post

I have a next and previous post link in Wordpress but if you're viewing the very last post or the very first post you get a blank space where no other posts meet the condition. How do I edit my code ...
0
votes
0answers
20 views

Next/Prev post with same multiple custom taxonomies

How can I link to the next and previous post only if they have the same terms in two different taxonomies? I can use get_adjacet_post, get_next_post and get_previous_post but they only let me ...
0
votes
0answers
15 views

Get previous post ID for wordpress blog in admin area

I use W3 total Cache for my wordpress blog. I want to automatically purge the cache of the previous post, when a new post is published (or when status of a scheduled post becomes published). Note: I ...
2
votes
1answer
46 views

next and previous post link ordered alphabetically

I found a snippet, which order all posts alphabetically. I wonder if is there a way to make it working just for one post-type? I have some custom post type in my website, and i want one of them to be ...
0
votes
1answer
46 views

How to exclude or filter password protected posts when using next_post_link() previous_post_link

I'm using next_post_link() and previous_post_link() in my theme. I excluded my password protected posts from the loop. They only appear if you enter the URL of this specific post. But, the problem is ...
0
votes
0answers
22 views

Previous Next Post Link by Post Rank Value Stored in Another Table

I'm using the Q2W3 WordPress plugin to sort posts by category. This plugin allows a drag-drop interface to change the default post order and modifies the standard taxonomy output so that posts on the ...
0
votes
1answer
60 views

Need help with get_posts pagination

I've been working on a wordpress site, and I'm trying to build a page where visitors can see all of the images that have been uploaded to the wordpress media gallery, regardless of whether or not said ...
-2
votes
1answer
95 views

Next and prev. post link ONLY within category

Im using the next post link function of WP to show next and previous navigation links to the "next post in same category" all good with this...the issue i have is that when I'm in the "last" post of a ...
0
votes
1answer
29 views

Include scheduled ( future ) posts in WordPress post navigation ( previous_post_link, next_post_link )

Is this possible? How can i change the query for adjacent posts and add 'post_status=future' to display next and previous posts for scheduled ones? I suppose i should use some kind of filter, but ...
0
votes
0answers
54 views

Next/Prev category post in same button

i like to put a navigation link in my posts, can you help me? How can do this? http://prntscr.com/64ksjd I've this code but, it show 2 hiperlinks, i want 1 hyperlink: $post_id = $post->ID; ...
1
vote
1answer
48 views

Add #anchor to next/previous_post_link

I have tried to figure out to change the previous_post_link by following the Codex but I can't figure it out. Same for the next_post_link. I just want to have a simple link but with an #anchor tag ...
1
vote
1answer
53 views

next_post_link for CPT only working for a few posts? weird!

I have about 20-30 posts in a CPT, and when I click on a single post and use the next_post_link and prev_post_link functions it will only show a select 5 posts out of the 20-30... always the same 5 as ...
0
votes
0answers
260 views

Previous and next posts with images on attachment page (image.php)?

Show two previous, current and two next posts with post featured images and links to previous and next post on attachment (image.php) page? I have image gallery site and that kind of navigation is ...
1
vote
2answers
127 views

Is it possible to nest get_previous_post()?

I am trying to retrieve the previous and the 2nd previous posts' featured image as well as the two next posts' featured image. <div id="cooler-nav" class="navigation row"> <?php $prevPost = ...
0
votes
0answers
110 views

Show prev and next post links for parent post of current image in attachment page?

I use this code to show previous and next posts (in same category) on post pages (single.php). <?php $next_post = get_next_post(TRUE); // TRUE = in same category if (!empty( $next_post )): ?> ...
0
votes
2answers
44 views

Fetching All Posts (200+) in a Category - Performance Issues?

I want to get the IDs of the 2 previous and 2 next articles in a certain category to show them as a "related videos" playlist. I know that there are the functions previous_post_link and ...
1
vote
2answers
107 views

“next_posts_link” and “previous_posts_link” display me NOTHING

I'm trying to add links "Previous Post" and "Next Post" in my single.php file without success because previous_posts_link and next_posts_link dont return anything. Honestly I do not know where in the ...
3
votes
1answer
373 views

How to get next and previous post links, alphabetically by title, across post types, in a shortcode

I need next and previous post links in a single post page using a "page-builder" type of CMS—specifically the DIVI theme by Elegant Themes. So, I need the links to be able to appear using Shortcodes, ...
0
votes
0answers
41 views

Next post with category with an option to view all

Wordpress provides for a way to link to next/previous posts within a category but is there a way to get this to work with a 'View All' option, as well? In other words, the main page would look like ...
-1
votes
1answer
412 views

Previous / next posts using featured image thumbnail as links

I need navigation to two previous and two next posts, inside same category. I made it working great for one previous and one next post inside same category. This is what I have now. Previous post: ...
1
vote
2answers
552 views

Exclude Posts From Specific Category from Next and Previous post links

I've been searching for this a lot...but all I get is not what I need. I simply want to show next and previous links on single.php (from all the categories, based on publish date, not just in the ...
0
votes
1answer
200 views

Single.php Category Post Count

I have the following code in my single.php file: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); next_post_link('%link', 'Next', TRUE); ...
0
votes
0answers
93 views

using next-page and previous page inside a wp_query

I'm using a wp_query on my website to display a list of child pages from a parent page. It works fine and my pages are sorted by a meta_key using a custom field. Now I would like to add a next page ...
0
votes
1answer
65 views

How to edit the '<— older' link on archive page in Blankslate theme? [closed]

I am using the 'Blankslate' theme for Wordpress and I edited about everything except for the older and newer links on my blog page. How can I change this links in the Blankslate theme? It isn't ...
0
votes
2answers
361 views

Link to the next/prev posts in index loop in same category?

Is it possible to link to the next/prev posts in index.php with query_posts('cat=56'); before loop? <?php query_posts('cat=56'); if (have_posts()) : while (have_posts()) : the_post(); ?> next ...
1
vote
1answer
113 views

Can I use images as anchor tags with <?php previous_post(); ?><?php next_post(); ?>

Rather than displaying the title of the next page, I would like to display a large arrow that can be clicked on. To do this I shall either be using image files, or the tag. Can this be done?
0
votes
1answer
95 views

show previous/next post orderer by title in custom post types

What's a working method to show link to next and previous same custom post type article, ordered by title and not id? (generally applying a filter to the order)
3
votes
1answer
688 views

Filter next_post_link() and previous_post_link() by meta_key?

I have a page with two sections, each uses a different WP_Query() to pull in events, which are a custom post type. Each WP_Query() queries a meta_key for the event date so that Section 1 only displays ...
0
votes
0answers
113 views

previous_posts_link returns null when querying custom post type

I have created a custom post type named lesson, and I want to display all lessons, so I created a custom page named lesson.php, inside, I added a query to look for all the posts which type are lesson. ...
0
votes
0answers
109 views

next_post_link and previous_post_link order not working properly

Very strange problem, i have uploaded lots of photos and made posts for each of them so i have them in order 1 to 120. I have used next_post_link and previous_post_link in my loop eg. <?php if ( ...
1
vote
3answers
494 views

Problem excluding category from get_next_post

I have a custom post type called "exhibitions" that uses the native "category" taxonomy. I have three categories: Current, Past, and Featured. Posts get marked either Current or Past and some are also ...
0
votes
2answers
318 views

Can't get the previous and next posts permalink

I tried to get the next and previous URL, and create a navigation. But it seems to only retrieve the permalink from the two first posts (but not the others recents posts). I have 5 posts (ID = 25, ...
0
votes
1answer
856 views

previous_posts_link and next_posts_link, how to return the next/previous post's title as the url

The site I am working on needs to have the returned url set a specific way. That being said, all posts are basically images that are posted, with there titles being said as the page urls. How do I go ...
0
votes
0answers
63 views

Wordpress doesn't generate rel=prev & rel=next

I am developing a Wordpress theme from scratch and I've been using previous_post_link() & next_post_link() quite often and never had any trouble using them. Until now.. So what I'm trying to ...
0
votes
0answers
138 views

customize urls displayed by previous_post_link and next_post_link

I am using the below code to display my next and previous links in single.php: <div class="nav-previous"><?php previous_post_link( '%link', '<img height="34" src="' . ...
0
votes
2answers
78 views

Previous and next post links formatting

Here's an interesting question. I am trying to format previous and next links using the following format <?php previous_post_link('<strong>«</strong>'); ?> <?php ...
0
votes
1answer
33 views

Multiple next / previous

One of my custom post types requieres multiple next/precious post titles buttons for usability issues. Does anyone know how to get this working? Example: LATEST POST (Today) [previous post title] - ...
0
votes
1answer
273 views

Post in multiple categories do not include in previous / next post if one category in excluded

I have read the following post which appears to solve my problem but doesn't... excluded_categories parameter in next_post_link() behaving unexpectedly I have posts in say 3 categories but if they ...
1
vote
1answer
78 views

Next and/or previous post content

How can I show the content in next or previous post? For example, I use this to display the next post link with title: <div class="alignleftfp"> <?php next_post_link('%link', ...
0
votes
1answer
274 views

Custom Posts and Posts - next_post_link and previous_post_link not working together

I have regular posts and one custom post type ('SS13') pulled in together on the same page. When you click through to the 'single' page for each the next_post_link and previous_post link only work ...
2
votes
1answer
254 views

previous / next post with thumbnail

I've got another question regarding next / previous post. At the moment I'm working on our portfolio with several items. Each item is a post with a title, category & featured image. When viewing ...
0
votes
2answers
304 views

Previous and Next Navigation buttons take the user to the wrong posts

I am currently developing a portfolio section on my website and when the single posts are viewed, there are some previous and next links to take the user to the next post. Upon reaching the first ...
0
votes
1answer
109 views

single post navigation order (NOT chronological)

in my main loop i show only posts of the 'artworks' post type, orderby=rand. when i view a single artwork and use the next / prev nav, it disregards the main query and goes by chronological order - ...
0
votes
1answer
265 views

Single post navigation Previous post link shows up but Next post link doesn't

I'm desperating with this odd issue related to Previous and Next post link. I have this single-name.php which is called by this condition in single.php: <?php if (in_category('mob')) { include ...
0
votes
1answer
176 views

Why are previous_post_link/next_post_link skipping some posts?

I have a single page template for one of my custom post types. Are the top of this page I have... <?php previous_post_link('%link', 'Prev Project'); ?> <?php next_post_link('%link', 'Next ...
0
votes
1answer
255 views

using images in next/previous_post_link [closed]

In my blog's pagination section, I've used <?php previous_post_link(); ?> and <?php next_post_link(); ?> to generate the newer and older posts links. Within that action, though, I've ...
-1
votes
1answer
698 views

pagination/prev and next page links not showing

I'm having trouble getting my pagination links to work, or even show up. I've tried several variations of the code, but here is what I have in home.php: <?php get_header(); ?> <?php ...
5
votes
1answer
499 views

get_adjacent_post alternative on a very large db

I'm using get_next_post and get_previous_post (from the same category) to show the thumbnail and link to the respectives posts in my single template, but it's in a very large db that is giving my ...
0
votes
1answer
283 views

Add Previous/Next Buttons to CPT Single Pages Only

I'm working with a site that is displaying a portfolio CPT on the home page in a "Grid Loop." On the single pages, i'd like to add Previous & Next Item buttons. I thus added this code: function ...
0
votes
2answers
184 views

Display next 3 posts based on custom taxonomy

I am wondering if anyone could help me accomplish something like this: https://medium.com/thoughts-and-words/5ccef7b3e1fc with custom post types? I have a custom post type called projects and ...