Thanks so much for providing this plugin! I noticed, though, that no changelog is provided for version 1.3.5 — could you add that / let me know what changes were made?
]]>Using WP Sort Order?(1.3.2)?and PHP 8.3 /wp-content/debug.log seems to be filled with 3 main PHP Notices and these are below:
PHP Notice: Function is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a>Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /wp-includes/functions.php on line 6078
PHP Notice: Function is_front_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a>Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /wp-includes/functions.php on line 6078
PHP Notice: Function is_feed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a>Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /wp-includes/functions.php on line 607
After doing some testing the problem seems to be connected to /wp-content/plugins/wp-sort-order/inc/hooks.php on line 898 it has the following code:
} elseif(!is_home() && !is_front_page() && !is_feed()) {
Please would you be able to take a look and release a fix?
]]>Hello, I set this plugin to be able to reorder the plugins list installed on my site. Then I installed the Plugin Notes Plus plugin to allow me to add short notes about the plugins I have installed. While the sort order was active for plugins I was not ale to use the notes plugin, it did not allow to add notes. Disabling the sort option for plugins allowed for the Plugin Notes Plus plugin to work as intended. Any way to fix the problem? Many thanks.
]]>For the premium option do you have the facility to purchase different ranges so that one can subscribe to options for utilization of the plugin for: 1- single site option
2- up to 25 sites
3- unlimited sites
In addition the options for lifetime usage
Please advise
]]>I am developing a website on Archicon Theme and i have several portofolio categories with items in them.
I have install the WP Sort Order to order the display to frontend by dragging and dropping items on admin page.
I have some items that belong to more than one category and i want to sort the category independently one from another.
If i sort items in a category, i don’t want to mess the order in another.
Is there a workaround the plugin to do something like this?
Hi,
We are using the Divi theme and we have a problem with reordering the project categories. Although we have changed their order in the back end, it does not change in the front end.
Screenshot: https://prnt.sc/8DCS1kbJcTwb
Example Project: https://deweb.gr/project/kapsiotis-optics/
Edit: We realized that the projects order is not displaying correctly in the front end either so we are trying more plugins for now. Please let us know if you can fix it.
Hi! I was having trouble when publishing new posts. Even though they should be the newest, they where relegated to the final page of the blog page. And they weren’t picked up by rss feeds.
The problem stopped when I deactivated WP Sort Order.
I’m sending this as feedback. I hope it helps.
]]>I’ve seen a few posts with this problem but no solution.
I’m working on a gallery page. I needed to manually sort on three levels: Artist, Artist Category and Works. After successfully sorting everything, I noticed that the middle level Artist Category had reverted to the same order it had before sorting. And now everytime I change the order on the Artist Categorie it reverts back on reloading the page. I am certain it worked the first time around – now it doesn’t.
Any idea why?
Thanks in advance.
]]>Hi — I needed to update my CC with you – to renew my subscription for the year… and I did do that.. But I’m unable to update the plugin as it shows as expired and when I click “check again” — it comes back in same state…
Help! i have renewed!
Kim
]]>Hi,
The ordering not working on custom taxonomies, Query Monitor plugin, shows some warnings about “undefined offset”. Please see the screenshot:
https://photos.app.goo.gl/QGJoYRnDCr1P5xtw9
I tried to deactivate all plugins but the problem persists.
Plugin version: 1.2.6
WP: 5.8.3
the plugin works fine in the backend, but does not give results in the frontend. should the plugin change the position of posts in the frontend?
]]>Hey, I was wondering if there is a hook that I can use to prevent reordering under certain circumstances?
I have a listing of custom post type and optional filtration by custom taxonomy.
If there is no custom taxonomy (category) set, I would like to prevent reordering since it messes up order made when custom taxonomy filter was applied.
]]>I used the plugin 2 days ago, and there was a hand-tool (when I hovered over the post listing) which allowed me to move the order of the post. Suddenly now there is no tool…!! The plugin is activated, but I can’t move any of the posts.
What happened?? Thanks for your help.
]]>After installing the plugin . I get an error on top of the dashbord page as follows
“parameter 2 to be array, string given in /home/tooga/public_html/wp-content/plugins/wp-sort-order/inc/hooks.php on line 873“<br/>
Below copy of Hooks.php file starting on line 869 taken from my cpanel:<br/>
**********************************************************
868-$wpso_objects = isset( $wpso_options[‘objects’] ) ? $wpso_options[‘objects’] : array();
869-
870-
871- global $wpdb;
872-
873- if(!$post->menu_order && in_array( $post->post_type, $wpso_objects )){
874- $sql = ‘SELECT MAX(menu_order) FROM ‘.$wpdb->posts.’
875- WHERE post_type = “‘.$post->post_type.'” ‘;
$max = $wpdb->get_var($sql);
if($max>0){
wp_update_post(array(
‘ID’=>$post->ID,
‘menu_order’=>$max+1
));
}
}
}
add_action(‘admin_footer’, ‘wpso_admin_scripts’, 100);
function wpso_admin_scripts(){
global $wpso_allowed_pages;
************************************************
Can u kindly help with the change of coding since I do not have enough knowledge on php.
Many thanks
We had an identical error to that described previously whereby the sort order was seemingly changing back on return to the post listing page. This was on a site running WP version 5.2.2.
I have debugged this plugin and found two bugs. The Wpso::update_menu_order method does not work when you have two posts that both have a menu_order value of 0.
For some reason it takes an array of the existing menu orders (e.g. [0,0,1,2,3]) and re-uses these indices when applying the new sort order. So if you move the one at position 2 in the list to the top, the 0 will be unchanged. Ordering is therefore ambiguous. This could be fixed by not relying on the existing values, just use [1,2,3,4,5] instead.
The other bug which compounds this issue, is when you create a new post it’s created with a menu_order of 0, so this is how you end up with multiple posts being unsortable.
Addressing either of these bugs alone will fix the issue. Therefore, since this plugin. I’ve written a fix for my project. I could have overridden the update_menu_order hook with my own solution but then I would have had to monitor this plugin for when that method was updated or fixed in future version. I therefore chose to add my own hook on post save that adds a menu_order value one greater than the current maximum for the post type. This means that new posts go straight to the bottom of the list and re-ordering works as advertised.
**note:** This won’t work as a stright copy/paste. I use my own library for hooks so I don’t have to rely on the dumb opaque strings that WordPress insists on using. The closure I’m creating here automatically removes itself as soon as it’s applied to prevent recursion. There’s some background infor here if you wanna know what’s going on here: https://dev.to/thisleenoble/preventing-free-range-wordpress-hooks-3n8a
private function patchSortOrder(){
global $wpdb;
if(function_exists('wpso_activate')){ // WP_Sort_Order plugin bug fix
closure::createAction(action::SAVE_POST . '_' . $this->type, function ($postID, \WP_Post $post, $update = false) use ($slide, $wpdb) {
if(!$post->menu_order){
$sql = 'SELECT MAX(menu_order) FROM '.$wpdb->posts.'
WHERE post_type = "'.$this->type.'" ';
$max = $wpdb->get_var($sql);
wp_update_post(array(
'ID'=>$post->ID,
'menu_order'=>$max+1
));
}
}, 99, 3);
}
}
]]>
Can you fix this? It’s cloggin my error log:
Trying to get property ‘id’ of non-object in /web/html/kmccontrols.com/wp-content/plugins/wp-sort-order/inc/hooks.php on line 55
“global $current_screen” is a bad idea. Use get_current_screen() and make sure it’s defined before checking the id, please.
]]>You can drop and drag then refresh the page and the order goes back to the way it was.
So does not work under 5.1.1
]]>While posts seem to be in the order I want them in on this page, the last two posts I added will not remain in the post list where I place them. They default to the most recent position in Posts section of WP Dashboard.
]]>Hi there,
I would like to be able to drag and drop the items in the list on the order page (in the backoffice).
Do you know if this is possible with this plugin?
Regards
]]>Is there a way to make the next_post_link() and previous_post_link() functions obey the new sort order?
]]>I got this error after upgrading the plugin:
WordPress database: [Table ‘<WPPREFIX>.wp_term_taxonomy’ doesn’t exist]
I resolved it by change line 29 in functions.php from
$expected_terms = $wpdb->get_results(“SELECT t.term_id FROM wp_term_taxonomy t WHERE t.taxonomy=’usercategories'”);
to
$expected_terms = $wpdb->get_results(“SELECT t.term_id FROM “. $wpdb->prefix . “term_taxonomy t WHERE t.taxonomy=’usercategories'”);
]]>Hi,
plugin is working great on desktop view. But unfortunately an my mobile I cant access posts in the backend, because tabs are somehow captured by this plugin. So no tab on “edit” etc possible.
Maybe provide an option to disable for mobile?
Thanks!
]]>New to WordPress and PHP,
When I drag and drop posts into a new order on the admin page, the menu_order
of the posts updates correctly in the database. However, when I refresh the admin page, the order resets.
I see the bit in the FAQ on how to override ‘orderby’ and ‘order’, but I don’t understand where I would do this. Do I add this code to the wp-includes/class-wp-query.php file, or somewhere else?
Is this even what’s causing the order reset?
Thanks!
]]>So, me again trying to integrate into my wordpress workflow.
I’ve tried to configure the plugin along with PODS (I’m using it to create the custom taxonomies + custom post types). It works smoothly with custom post types, but I couldn’t make the new ordering work with custom taxonomies (categories and subcategories). I commented the line that usually ordered by term_id, but still keeps the same order. any tips on how to do it?
$pod_processos = pods(‘processos’);
$pod_processos_params = array(
‘where’ => ‘tt
.parent
= ‘. $cat_id,
//’orderby’=> ‘term_id ASC’
);$pod_processos->find($pod_processos_params);
while ( $pod_processos->fetch() ) :
echo $pod_processos->field(‘title’);
endwhile;
Thanks,
]]>Just a question based on general usability of this functionality.
Today, we can sort posts in the All Posts screen and Categories (or Taxonomies) inside the All Categories screen. Very useful indeed, thanks.
My question is regarding getting these 2 pages together, and rearranging everything in one single screen. Like this:
– CATEGORY1
— SUBCAT1
——- POST1
——- POST2
——- POST3
——- POST4
— SUBCAT2
——- POST1
——- POST2
——- POST3
– CATEGORY2
— SUBCAT1
——- POST1
——- POST2
Based on your experience of coding this plugin, is this possible to do?
]]>Hello,
if “Posts” is unchecked, reordering doesn’t working.
Could you please help with this.
If check “Posts” all is good…
]]>i wonder why no one has been able to make something like this to reorder our plugins list…???
]]>This plugin is very good. Why ? Because it does exactly what it advertises and nothing more. I love lightweight plugins, and this is a fantastic example. It does what it should (provides a drag-drop admin interface) and doesn’t add anything to the frontend of the site.
Highly recommended.
Thank you very much Fahad Mahmood
]]>