The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
52 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
57 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
91 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
21 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
35 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
135 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
65 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
0answers
28 views

Can display previous post with or without wp_pagenavi

I use Wordpress with the free version of Pageline platform theme. I figured out that the "previous/next entries" links are displayed on the main page but not on my others static pages. I tried to use ...
0
votes
1answer
47 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
150 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
62 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
71 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
140 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
40 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
104 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
277 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
54 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
82 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
61 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
25 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
196 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
66 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
229 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
189 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
169 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
84 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
162 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
123 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
160 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
452 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
399 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
187 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
162 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 ...
0
votes
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
150 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 ...
0
votes
2answers
594 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
155 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 ...
10
votes
5answers
2k 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
167 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
303 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 ...
0
votes
1answer
182 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
126 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
251 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
21 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
728 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
331 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
80 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, ...
2
votes
2answers
2k views

Get Previous & Next posts by Post ID

How can I go about getting the previous and next posts from outside the loop? Everything I try to do aside from the custom SELECT query (using get_posts or WP_Query) breaks stuff further down the ...
0
votes
2answers
891 views

query_posts pagination will always show identical content

Anyone here see why my pagination won't work? I can get "previous page" to show up, but when navigating to "page-2", the content will stay identical to the content on "page-1". <?php /* Template ...