Hello,
I’ve just installed your plugin in WP 6.2. However, there are no buttons to be found (block editor). Is there any way to make them appear ?
Thanks for your help
]]>I installed the plugin and it works fine for the standard blog posts. I also use custom posts (crocoblock) but the button does not appear here. Is there something for this or something that I can add myself so that they are also recognized. Thanks in advanced
]]>Could you had a hook to modify the post types that are supported? That way, a person could modify which posts have the buttons.
Something like:
$supported_types = apply_filters( 'next_prev_post_button_supported_types', array('page', 'post') );
Thanks
]]>Thanks for the great plugin! exactly what I need ??
In my case, however, the sorting does not match the position of the posts.
With the following filter, the order can be adjusted according to “menu-order”:
function wpse73190_adjacent_post_sort( $orderby )
{
return "ORDER BY p.menu_order ASC LIMIT 1";
}
add_filter( 'get_previous_post_sort', 'wpse73190_adjacent_post_sort' );
add_filter( 'get_next_post_sort', 'wpse73190_adjacent_post_sort' );
Why is this necessary?
If the order of the posts is changed using drag-and-drop (plugin), then the sorting of the function next_post_link & previous_post_link is no longer correct.
Have a good day David
]]>The buttons show up on some posts, but don’t on others (development site).
Like someone in another thread suggested, this might have something to do with the order in page / editor loading.
I’m not so fluent in JS, so I did not manage to solve the issue. Is there anyone who does know a way to solve the issue?
]]>I’ve seen a lot of reviews with the complaint that the plugin doesn’t support custom post types. I needed this for several sites so instead of tweaking the code to manually add each custom post type, I’ve applied a tweak so that all post types are supported by default. I’ll explain the change below, in case anyone else finds it useful. Maybe the developer can include this in a future release?
Find line 48 in edit-next-previous-post-admin.php (/wp-content/plugins/buttons-to-edit-next-previous-post) that looks like this:
if( strpos($screen->parent_file, 'edit.php') !== FALSE && in_array($screen->id, $supported_types) && in_array($screen->post_type, $supported_types) && $screen->action != 'add'){
and change it to this:
if (strpos($screen->parent_file, 'edit.php') !== FALSE && $screen->action != 'add' && strpos($screen->id, 'edit-') === false) {
The buttons should now appear on all post types, including custom ones.
]]>Hi, I was happy to be using your wonderful plugin but unfortunately it is not showing up anymore since my update to wp5.6. I tried turning it off and on again, tried reinstalling the buttons – no luck. Turned of plugins that I have updated recently.
I do have an old theme – but am using the block editor – could that be it?
Thanks in advance!
]]>Hello,
the place I need such a plugin to work is actually to navigate between products in Woocommerce. I believe products are custom post types ??
Can you add this capability in a future version please ?
Thanks & regards
Is it possible to have the next/previous buttons also do the “update” function once they have been clicked? currently I’m clicking update first and then next (long long story, but seems to be the only solution)
]]>Hi Aftab,
Thank you for creating such a wonderful plugin. I am having issue with it not appearing on the last post.
Please help with and thank you in advance.
]]>Hello !
I would like to translate the plugin in French (the text on the buttons).
Will you be able to prepare your plugin in order to translate it ?
Thanks in advance.
Would it be possible to implement this same navigation but having an option to skip other Authors’ posts or other Categories in a multi author site?
I’m also testing the plugin with WordPress 5.5 RC1 and the buttons are not visible in the new editor. I’ll look forward to an update for the final version.
]]>Hi,
as the title says your plugin is skipping posts with post_status other than “published”.
Can you add this functionality to your plugin, which is great ..
thanks
]]>Hi,
the plugin fits our needs, however we really need to implement a restriciton.
we would like to be able to have the navigational links point only to the logged in users’ own posts. Currently it links to literally all, which is something we want to avoid.
Could you help me in finding something that works ?
‘add_action(‘admin_print_footer_scripts’,’amm_edit_next_prev_post_button’);
function amm_edit_next_prev_post_button(){
$screen = get_current_screen();
//echo “
"; //print_r($screen); $supported_types = array('page', 'post'); if( strpos($screen->parent_file, 'edit.php') !== FALSE && in_array($screen->id, $supported_types) && in_array($screen->post_type, $supported_types) && $screen->action != 'add'){ //Prev-Next are arranged acc. to post table so switched next to prev and prev to next $next_post = get_previous_post(); $previous_post = get_next_post(); $current_user = wp_get_current_user(); ?> <!--<style>body{background-color:red !important}</style>--> <script> if(window.jQuery) { jQuery(document).ready(function($) { $(window).load(function() { var is_next_post_available = '<?php echo ($next_post->ID) ? true : false ?>'; var is_prev_post_available = '<?php echo ($previous_post->ID) ? true : false ?>';']]>
Hi,
is it possible to swap the Previous/Next buttons? Due to my setup the Previous button will go the Next Post and the Next button will go to the Previous post.
]]>Hi all,
This is amazing plugin, that can be easily extended to support custom post types like Events, Projects, etc.
Do the following:
1. Open plugin folder and find file edit-next-previous-post-admin.php;
2. Find function amm_edit_next_prev_post_button() in this file;
3. Find line $supported_types = array(‘page’, ‘post’); in this function;
4. Now replace line
$supported_types = array('page', 'post');
with line
$supported_types = array('page', 'post') + get_post_types(array('public' => true, '_builtin' => false), 'names', 'and');
This will add Previus/Next buttons to all custom post types you have registered in your WP instance.
Code explained: get_post_types() in built-in WP function to retrieve all registered post types. With first argument we filter out only public post types that are NOT system types (this is because we already have listed ‘page’ and ‘post’ type earlier, and we do not want other types like menues or revisions). This function returns array, so we add it to array defined by author.
Enjoy!
Thank you Aftab Muni for this great plugin!
Please extend it with my code to cover also custom post types in next version.
I have the latest version and it has been activated.
Here is a screen shot: https://blogs.caryacademy.org/files/2020/02/Annotation-2020-04-09-102743.jpg
Thank you for any help.
]]>Thank you very much for this helpful plugin.
Would it be much effort for you to make it work for events as well?
Thanks in advance and keep healthy and happy,
Frank
]]>I have created a lot of pages and I edit a lot of them over time so it would be nice if it also has a next/prev button. It works well on posts, but not on pages. What can I edit on the plugin to make it work on pages?
]]>