Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
26 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 ...
0
votes
1answer
48 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
33 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
225 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
191 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
137 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
41 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
45 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
233 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
82 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
63 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
313 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
74 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
85 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
259 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
0answers
46 views

Remove link to post thumbnail in next_image_link() in single-attachment.php

I've added navigation to single-attachment.php: <div class="navigate"> <div class="previous"><?php previous_image_link( false, '&nbsp;'); ?></div> <div ...
0
votes
2answers
158 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
505 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
56 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
101 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
64 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
28 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
232 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
72 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
248 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
218 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
210 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
94 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
188 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
145 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
178 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
573 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
437 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
217 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
173 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 ...
1
vote
3answers
2k views

How to use next_posts_link/previous_posts_link for custom post types paginate?

I have a question about usage of previous_posts_link/next_posts_link. Is it possible to use it for custom post types too? I like to hear from you. Thanks in advance. Casper
0
votes
2answers
164 views

How to add a class and title attribute to the link generated by next/previous post

The following code <?php previous_post('%', '&#60;', 'no'); ?> <?php next_post('%', '&#62; ', 'no'); ?> returns these links, as it should <a ...
1
vote
2answers
701 views

Using previous_post_link and next_post_link to wrap around post sequence

For a single custom post type, I'm using previous_post_link and next_post_link with simple arrows. (Although text arrows are shown here, in the actual I'm using graphics with the text hidden via CSS.) ...
0
votes
1answer
171 views

Is it possible to remove next-post / previous-post with out creating a custom template?

I'm creating a plugin that uses a custom post type. I do not want to make a custom template for viewing the posts and discovered I can add a filter for the_content to include my custom fields, this ...
11
votes
5answers
3k views

Can the Next/Prev Post links be ordered by menu order or by a meta key?

I have a series of posts that are ordered by a meta_key value. They could also be arranged by menu order, if necessary. The next/prev post links (generated by next_post_link, previous_post_link, or ...
0
votes
1answer
201 views

Change next_post and previous_link to navigate throught parent categories only

I have this unchanged code from template-tags.php which links through all of the posts on the site. However I would like to restrict it so that it only links through the articles which are in the same ...
-1
votes
1answer
314 views

Retrieving next_post_link() and previous_post_link() in functions.php

I'm trying to create a function in functions.php that includes the next_post_link() and previous_post_link() without success. It returns empty. My guess is that these don't use the post ID... So what ...
1
vote
1answer
205 views

Get Adjacent Post By Tag

In this answer -- How to Get Next or Previous Post in a Specific Tag? -- a working function is provided to generate "next/prev" links by tag rather than category. How could one make this so that you ...
0
votes
1answer
128 views

navigation among single posts

In the twentyeleven theme each single post page has two navigation links which point to previous and next post, irrespective of the search made by the user. That is, the next post is the successive ...
1
vote
0answers
263 views

Post in Multiple Categories to stay in current category (permalink, next previous post link)

I guess this has been mentioned before, but after 2 days of browsing i haven't find a complete solution. Maybe someone has come across this problem before? I'm building a designer portfolio where ...
0
votes
2answers
1k views

Next/Previous links doesn't work in the same category

I created a category and call it "Blog". Then I created some posts and assign "Blog" as category for the posts. So I'm trying to go to previous/next into the same category and doesn't work. Here is my ...
0
votes
0answers
23 views

How to show Next/Previous within the same Category? [duplicate]

Possible Duplicate: Previous/Next Post Within the Category? I got this code from a website. http://wordpress.mcdspot.com/2010/06/02/stay-in-category/ <div class="navigation"> ...
0
votes
1answer
871 views

Previous/Next Post Within the Category?

I want to add a code in my theme to show a Next/Previous link below the post but within the same category. I Don't need a thumbnail but if possible I would appreciated, still that's not important ...
0
votes
1answer
364 views

Next Prev Post link rendering current post thumbnail

i am using below code which should render next and previous post thumbnail but it is showing the current post thumbnail in Custom Post Type single page <?php $prevpost = get_previous_post(true); ...
0
votes
1answer
84 views

Previous and Next posts

I use the following code for displaying the previous post thumbnail with links: <?php $prevPost = get_previous_post(true); $prevThumbnail = get_the_post_thumbnail($prevPost->ID, ...