Sorry, I know I must be missing something simple here. Using WP 6.6.2 and SPO 2.7.2. I have 2 custom post types, created with CPT UI 1.17.1. Both have “Page Attributes” checked. Both show the “Sort by Order” option above the drop-downs. I’m able to drag and drop the order for both. However, only one has any affect when viewing the posts. I must have done something different for one of them, as it works, but I can’t figure out what it is. I’ve linked to the page above where SPO is not working. Any insight and/or help would be greatly appreciated. Thank you very much.
]]>In the version number, please use major version when introducing breaking changes.
E.g. When you in 2.7.2 changed the minimum WordPress version from 6.3 to 6.4, it’s a breaking change and the version should change to 3.0.0 ??
In the enterprise, we move slower than the rest, and I had to do a redeployment (my acceptance test caught the “error”: Failed to activate plugin. Current WordPress version (6.3.5) does not meet minimum requirements for Simple Page Ordering. The plugin requires WordPress 6.4
.)
How can I get rid of the extra “action=spo-move-under-sibling” shortcut that now shows on page/post hover? It’s confusing and inconvenient when clicked accidentally.
]]>I got some errors inside the admin interface. Look at the screenshot and on the bottom right you see which WP and PHP versions are running.
]]>Heya @jeffpaul
Love the plugin, just a minor request – can you please do a check for the array key before assignment, so that it doesn’t fill logs with warnings?
Here is the code:wp-content/plugins/simple-page-ordering/class-simple-page-ordering.php:429
:
// Get the relevant siblings.
if ( 0 === $post->post_parent ) {
$siblings = $top_level_pages;
} else {
$siblings = $children_pages[ $post->post_parent ];
}
Here is my recommended mods:
// Get the relevant siblings.
if ( 0 === $post->post_parent ) {
$siblings = $top_level_pages;
} else {
$siblings = !empty($children_pages[ $post->post_parent ])?$children_pages[ $post->post_parent ]:array();
}
Possible, please?
]]>Hello,
Hello, this plugin has become essential for me and I thank you!!!
Will it be updated?
Hi,
I have tens of websites that use this plugin, and used it for many years, but 1 site seems to give me issues all of a sudden. It’s working on my local installation but the dev and production servers are having issues. There is no custom code regarding this plugin in de functions.php and it already happens on the default ‘page’ post type. I’ve also ‘Reset Sorting’ for the page overview and after that turned off any possible conflicting plugins, with no succes. Maybe I can create an admin on the dev server so you can check? (please don’t deactivate the caching plugin, it breaks the admin)
One thing I see is that the element with id ‘the-list’ doesn’t get the ‘ui-sortable’ class. There aren’t any errors in the console though. Switching to a default theme didn’t help either. I don’t know where to look any further.
Thanks in advance!
Tom
I added the following code to my functions file to add “order” to my stock posts.
add_action( 'init', function() {
add_post_type_support( 'post', 'page-attributes' );
} );
Reordering looks correct except every post I move looks as if it’s under a parent with “–” or “—” before the post title. If I click “Sort by Order” to refresh, everything kind of jumbles around into a different order than I put them in. They’re more or less in the right vacinity but definitely not where they should be.
Upon further examination, I can see that posts are getting assigned the same order value and it’s grouping those posts together and then sorting alphabetically I think. I tried reordering literally every post and still they’re being assigned the same order value.
How can I fix this?
]]>Hi there,
First off, happy new year, I hope it’s been a good one ??
I’m looking to limit the ordering functionality to administrators only on a site I’m working on. I’ve tried removing the hooks wp_ajax_simple_page_ordering and wp_ajax_reset_simple_page_ordering for editor users, but it’s been ineffective. Any suggestions?
Cheers,
RS
Love this plugin but we have a list of around 1000 posts within a custom post type (front end is https://peterloy.wpenginepowered.com/stock-list/). We are finding that when we move a product down – especially when we move it a long way – we are getting the spinning loader for up to 45 seconds before the new position is saved. Is there anything that can be done?
Thanks
]]>On a custom post type, I created a custom checkbox field within the Featured Image metabox using admin_post_thumbnail_html, and saved it using save_post. However when I sort one of the items, that field gets unchecked automatically and therefore I have to open the post and recheck the checkbox and save it. (and it doesn’t always fall back into sorted place). Perhaps i need something else in my code which saves the state of that checkbox when i use your drag n drop sorting? I’d like to resolve this so my client can drag n drop without worrying about automatically getting that field unchecked. Thank you. I’ll display the code below:
// Add checkbox to Featured Image metabox for Featured Project
add_filter( 'admin_post_thumbnail_html', 'add_featured_project_display_settings', 10, 2 );
function add_featured_project_display_settings( $content, $post_id ) {
$field_id = 'featured_project';
$field_value = esc_attr( get_post_meta( $post_id, $field_id, true ) );
$field_text = esc_html__( 'Featured Project?', 'bloomer' );
$field_state = checked( $field_value, 1, false);
$field_label = sprintf(
'<p><label for="%1$s"><input type="checkbox" name="%1$s" id="%1$s" value="%2$s" %3$s> %4$s</label></p>',
$field_id, $field_value, $field_state, $field_text
);
return $content .= $field_label;
} //
// Save it
add_action( 'save_post', 'save_featured_project_display_settings', 10, 3 );
function save_featured_project_display_settings( $post_id, $post, $update ) {
$field_id = 'featured_project';
$field_value = isset( $_REQUEST[ $field_id ] ) ? 1 : 0;
update_post_meta( $post_id, $field_id, $field_value );
} //
]]>
Hello,
I recently encountered an issue while installing the simple-page-ordering
plugin via Git. I noticed that the 10up-lib/wp-compat-validation-tool
directory contains an embedded .git
repository. This leads to a problem when the plugin is installed in a project that is also under version control with Git. It essentially adds another Git repository inside the existing one.
Having an embedded .git
folder is generally not advisable unless it’s intended to be a Git submodule, which does not appear to be the case here. It creates complications for users who clone the repository or install the plugin as part of their version-controlled project.
Could you please remove the .git
folder from the 10up-lib/wp-compat-validation-tool
directory to prevent this issue?
Thank you for your attention to this matter.
Best regards,
Tudor
Hello, I have been using the plugin and it worked perfectly but I had to add a language with wpml but now the plugin has stopped working, what should I do to make it compatible with wpml, is there any way?
]]>Custom posts on my site are added via the functions.php file. They are displayed in the admin as their own section.
(Hence this post – https://www.ads-software.com/support/topic/ordering-custom-post-types/ – isn’t relevant since it relates to a plugin that creates them)
Is there a snippet of code I can add to the functions.php file so that I can use this plugin to reorder the custom post pages in the admin to my preference?
THANK YOU!
]]>We have 125+ pages arranged by parent/child I want the site/map (Pages) to match the menu structure. Is there a way to move a parent AND all the children at the same time? I am new to the plug-in and may have missed the answer.
Thanks
]]>Hi there!
Before you create your own thread on these forums, please note that the Simple Page Ordering plugin is marked as Stable support:
10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.
Given the above support note, we do not intend to be regularly active on these support forums and will instead keep a closer eye on bugs or security reports within the GitHub repository. Even with the Simple Page Ordering plugin being under Stable support, there are several ways in you can find the answers to your questions:
Thanks,
Team 10up.
I’m using WP 6.1.1 and Simple Page Ordering 2.4.3. I want to use this plugin to reorder some custom post types. I’ve used a plugin called Custom Post Type UI (1.13.1) to create the custom post types. I’ve checked the option “Page Attributes” but still am not able to drag and drop my posts in the order I want. Am I doing something wrong? Thanks for any insight or suggestions.
]]>Hey there,
First I’d like to thank you guys for this plugin. Does what it needs to ??
I was searching in the documentation and topics on here but didn’t find what I need.
I’d like custom product ordering in WooCommerce. Can you guys help me out with this, if this is possible at all?
Thanks a ton in advance!
Jurri?n
]]>This plugin has been working fine for a number of years throughout different versions and WP versions however recently updating WordPress to v6.0.2 and the plugin to v2.4.2 I can no longer click and drag posts (standard WordPress “posts”) or Custom Posts. Pages however are working fine.
All other plugins in use on the site are uptodate and 100% compatible with WordPress v6.0.2. I’m logged in as an administrator. There are no custom functionality to exclude post types etc.
Any thoughts/ideas/solutions? Anyone else experience this?
]]>I realise this plugin sorts boths pages and custom post types but I only want to allow reordering CPTs. Is there a way to exclude pages?
I saw the code to exclude CPTs is as follows and I tried replacing ‘excluded_post_type’ with common numbers like 1, 2 & 3 but it didn’t seem to work. What is the Pages post_type_id and does it work with this code snippet? Thanks
add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) {
if ( 'excluded_post_type' === $post_type ) {
return false;
}
return $sortable;
}, 10, 2 );
]]>
We have parent pages with child pages under them. The menu order of each set of child pages is numbered. Each set of child pages goes from 1 to (whatever), usually between 4 and 15.
So in standard alphabetical order, it works like this—
Parent 1 (menu order 0)
Child 1 (menu order 1)
Child 2 (menu order 2)
Parent 2 (menu order 0)
Child 1 (menu order 1)
Child 2 (menu order 2)
I used Simple Page Ordering to change the menu order so the child pages are not in alphabetical order under the parent pages.
Now, it’s supposed to work like this—
Parent 1 (menu order 0)
Child 2 (menu order 1)
Child 1 (menu order 2)
Parent 2 (menu order 0)
Child 1 (menu order 1)
Child 2 (menu order 2)
However, the website itself did not change.
]]>Hi
Silly question or maybe not.
Does this plug-in re-order pages ‘only’ within Admin and not LIVE?
I only need it in admin to better workflow and waste less time finding them!
Thanks
M
Hi,
Can you please confirm if SPO is compatible with WP 5.9.x ?
Thanks.
]]>Hello,
Yes, I read the faq and add
add_post_type_support( 'post', 'page-attributes' );
in function.php
But, no reorder on posts …
Any idea ?
Hello! Great plugin that I use on all sites I build ??
Just wondering if there’s a way to allow it to change the order of items located within Elementor Pro Saved Templates and Theme Builder?
Regards
Melanie
Is there a way to drag/drop pages in such a way that they become parent and child (hierarchical ordering)?
]]>First, THANK YOU for this plugin. It has solved a very specific use case/need for us.
I see this plugin hasn’t been updated in a year and hasn’t been tested with the last several major releases. Perhaps that’s OK because all is well?
Can you confirm that this plugin is still being updated/developed?
Thanks!
Scott
]]>When you first visit the “Sort by order” page, items are ordered alphabetically (due to the admin query being orderby=menu_order+title&order=asc
and no items having a menu_order set).
After you set a manual order, all items have a unique menu_order set.
When you then start creating new items, its default position will appear to the user to be somewhat random. For example, if you add 5 new items, the first *6* items will be sorted alphabetically (including the first old item).
I would prefer to tell my clients this:
“By default, the most recent item you create will appear at the top,” [or bottom, depending on use case], ” but if you want it to appear somewhere else you can click on Sort by order”.
As opposed to this:
“Every single time you create a new item, you need to revisit the Sort by order page and make sure it in the position you want, because it may appear in a random position to begin with”.
Even if you didn’t make this the default behaviour, are you able to adjust the sort_by_order_link function to make the parameters filterable (for both the URL, and the ‘current’ check)? I can filter into views myself, remove your link, and add my own one, though it would be nicer if it were built in to ensure this doesn’t break in a future update.
]]>Hi,
I use your plugin on the first page of my site on custom posts (see “NOS MACHINES D’OCCASION” post part)
The plugin works but only when I am logged in and I have in public view “Personnaliser”> widget > the corresponding widget open.
When I exit “Personnaliser” the posts are no longer in the defined order.
If I am not logged in, the posts are not in the right order. Visitors to my website don’t have a login, so they never see the right order.
Can you tell me what I missed?
If you wish I can give you access to the WordPress administration.
Thank you for your help
]]>Hi, I included one url above but it happens in all the categories. We are not able to move pages it just hangs up and spins. Can you please advise if there is a fix?
]]>