For details:
Thank you for looking at this post, we resolved this by creating our own custom snippet that also supports the Gutenberg editor, custom post types and with less than 80 lines of code. Hope to see the plugin updated in the future, it’s super useful and needed and should be a standard really. ??
]]>Is there a way to tell the plug-in to navigate only between posts of the same language when using WPML?
]]>Hi there,
I use this plugin… and I’d like to know if there is something around for navigate media library objects
Thank you
Diego
I have used this plugin since years without problems. Now it seems to be random. No dates or post number related. I wanted to see options but there are no options under Screen options, only Columns (Description) and pagination (500)
]]>Hi there! First of all, nice work on this plugin!
I’d like to be able to filter APN’s query for one of my post types to only cycle through posts with a certain meta_query. Is this already possible somehow?
All the best!
]]>The new WordPress Gutenberg Editor prevents this plugin from showing up, what a pity, hope it can be fixed.
]]>#1: errors are logged when sorting by post title and the post title has an apostrophe or single quote. Quick fix is to change
$sql .= "AND {$orderby} {$type} {$post->$orderby}";
to
$sql .= "AND {$orderby} {$type} '" . addslashes($post->$orderby) . "' ";
#2: On WPML sites it will go between posts of different languages instead of staying in the current language. Quick fix is to change
if ( current_user_can( 'edit_post', $post->ID ) ) {
to
$my_post_language_details = apply_filters( 'wpml_post_language_details', NULL, $post->ID ) ;
if ( current_user_can( 'edit_post', $post->ID ) && $my_post_language_details['language_code'] === ICL_LANGUAGE_CODE ) {
Neither of these are ideal, especially the WPML since it’ll break if WPML is deactivated, but this should give you the info you need to get it done correctly.
Unless this plugin is dead. Is it?
]]>Hi there, finally a great and clean plugin for post previous/next navigation. Thank you!!!
I would love to use your plugin in the frontend, like so:
if( class_exists('c2c_AdminPostNavigation') ) {
global $post, $post_ID;
$post_ID = $post->ID;
$post_statuses = array( 'publish' );
c2c_AdminPostNavigation::$post_statuses_sql = "'" . implode( "', '", $post_statuses ) . "'";
$prev = c2c_AdminPostNavigation::previous_post();
$next = c2c_AdminPostNavigation::next_post();
}
The only thing I had to change in your plugin to make this work was to make the variable $post_statuses_sql
public. Does anything speak against this?
Hello,
Im having a weird issue I have 500+ products and when using the next and previous buttons it seems to be jumping 4/5 products ahead, like it’ll go from product a to product d.
End up getting lost ha.
]]>The problem with the previous and next buttons not appearing sometimes has to do with how the code assembles the SQL query.
The problem is on line 283 of admin-post-navigation.php
:
$sql .= "AND {$orderby} {$type} '{$post->$orderby}' ";
In some cases $orderby
is set to post_title
, which produces a SQL query that makes no sense, like this:
AND post_title > 'Has Your Hand Lettering Spark Fizzled Out? Here's 5 Ways to Stay Motivated & Driven'
How can a post_title
be greater or less than another post_title
? This also makes the SQL invalid when the title contains an apostrophe, as the title is not escaped or sanitized in any way.
My fix was to change line 283 to this:
$sql .= "AND post_date {$type} '{$post->post_date}' ";
That fixes the problem, but it stops the c2c_admin_post_navigation_orderby
filter from working, so it’s not a perfect fix.
I don’t know if the developer has abandoned this plugin or not, but I’d be happy to answer any questions and help with an updated version, just let me know!
]]>This is a GREAT plugin! I’ve wanted this functionality in WP for years and finally decided to look for a plugin today. Thank you!!
I have a site with about 200 pages. There are 2 pages that have an apostrophe in the title. On only those pages, the <- Previous Next -> buttons don’t appear. Not that big of a deal, but I thought I’d report it. Thanks again.
]]>Hi,
I was wondering if this plguin can be used to navigate custom post types, such as WooCommerce Orders.
Thank you,
Adrian
]]>Is it possible to use this for pages as well?
]]>This plugin works great for flat file structure (like posts), but when navigating between pages, it looks like it only looks for the next Order number, without considering the parent page. So I can jump from page order 22 in section A to page number 23 in section B.
It would be nice to restrict navigation to siblings.
I have version 2.0 installed and when I publish a post, the next button disappears. I have been using this plugin for years so hope there is a fix soon. Thanks
]]>Hey man,
the plugin seems to be broken on 4.4.
Some posts don’t have a next button, and sometimes the next button points to the previous post, or to the first post.
Thanks in advance,
Joff
Enjoy:
https://ge.tt/1YXi1BR2/v/0
Have a nice day ??
P.S: Consider supporting RTL (Right-To-Left) Interfaces (Hebrew, Arabic, Persian etc..) by simply applying different CSS rule when RTL interface is set.
instead
#admin-post-nav {margin-left: 20px;}
it would be:
#admin-post-nav {margin-right: 20px;}
https://www.ads-software.com/plugins/rtl-tester/
https://codex.www.ads-software.com/Right-to-Left_Language_Support
Hello Scott,
This is just the plugin I’m looking for; however, I have a bit of a issue.
I only want to work with draft posts. When I edit one, and then change status from draft to schedule, Next/Previous has me in Scheduled list.
Can it be configured to remain in draft mode only?
Best regards,
William
Great plugin, works as expected. Already rated at 5 stars ??
I’ll give you six if you can save a page reload and add the save/update on next/previous links ??
A couple of other suggestions/notes:
1. I’d have an option page giving the user choices about sort order. Even sort order per type, turning it on and off for types
2. I (personally) would love a button under the existing SAVE/UPDATE button which extends the whole width of the metabox : “Update and back to All” or “Save and back to All” It’s crazy that I have to do two page reloads to get back a screen (not your fault, I wish WP included the option by default.
3. I thought I would run an experiment on the user who complained about the apostrophe. That problem exists on my system as well. I personally don’t use apostrophes in titles, and so I’d never noticed. But I created one and the Prev/Next didn’t appear. I the added one more post and it was back. I went back to the first post, removed the apostrophe (and stupidly edited the slug at the same time). The next and back buttons came back as soon as I clicked update. This is more just for your info, I’ve already deleted the posts. I use “Types” from toolset for my custom posts creation.
]]>Hi,
This doesn’t seem to work on WordPress 4.3.
Can you please check?
Thanks!
]]>Hi. I’v added this filter:
/**
* Modify Admin Post Navigation to allow and disallow certain post statuses from being navigated.
*
* @param array $post_statuses Post statuses permitted for admin navigation.
* @return array
*/
function change_apn_post_status( $post_statuses ) {
// Adding a post status.
$post_statuses[] = 'publish';
// Removing a post status.
if ( isset( $post_statuses['draft'] ) ) {
unset( $post_statuses['draft'] );
}
return $post_statuses;
}
add_filter( 'c2c_admin_post_navigation_post_statuses', 'change_apn_post_status' );
to my theme’s functions file but it’s still navigating to posts that are drafts instead of published. Any help?
]]>The Next and Previous buttons do not display on custom post types that have apostrophes and other non alpha numeric characters in the title of the post.
]]>Hi Scott,
So glad I found this plugin — it’s so useful! Now I’m just trying to customize the order of the Previous/Next links. I’ve used the filter you provide and I’m able to order posts by post_date, but I can’t seem to order pages by menu_order (I don’t really care what happens with other CPTs)…
Here’s what I’ve got so far (the portion affecting pages isn’t working):
function custom_order_apn( $field ) {
if ( is_page() ) {
return 'menu_order';
} else {
return 'post_date';
}
}
add_filter( 'c2c_admin_post_navigation_orderby', 'custom_order_apn' );
I hope you can help me figure this out. Thanks very much in advance!
]]>Can you add support for media as well?
When you get an SEO report showing missing Alt tags (for example), it would be great to use this to go to the next image.
]]>I’ve translated your Plugin Admin Post Navigation in Japanese.
Please include these language files in your next release.
Thanks
]]>Hello! Is there any way to make this work for attachments too? I tried modifying the function to explicitly add the attachment post type but no go. ??
Thanks!
]]>I was a big fan of this plugin but I just discovered that if the site is using PAGES instead of POSTS all of a sudden the navigation isn’t available…
That’s really a shame, I liked this plugin a lot.
Could you make it work for PAGES too ?
Cheers,
]]>great little plugin!
One suggestion: I have a post type that has several h2 titles in the page, and the plugin added navigation to all of them. I changed the jQuery selector from ‘h2’ to ‘h2:first’ to fix this.
https://www.ads-software.com/extend/plugins/admin-post-navigation/
]]>Hello, I like me have “Update post and goto next/prev post” in the next plugin releases, thanks
https://www.ads-software.com/extend/plugins/admin-post-navigation/
]]>