Have a blog with a few post categories and a basic navigation menu you just set up: you want to sort your categories order manually, then search and decide to test Intuitive custom post order.
In the end, you’re not satisfied and, going to switch to another plugin of the same type, you leave that one just deactivated.
Then, you install Category Order and Taxonomy Terms Order, and you’re happy with the UI and results.
Time to clean up plugins: you click delete on Intuitive custom post order.
and BUM
you just lost all of your post categories, even the default Uncategorized, and the navigation menu entries are gone as well.
Don’t even mention if you tried doing the same on a big woocommerce catalogue with tens of categories and crowded menus and submenus.
That was my scenario and luckly I made a immediate restore from automated server backup.
I tested it also with a clean WP installation and it happened as well.
Why this happens:
Credits for the first warning goes to this support request, 5 years old now, where @leeppolis detailed the issue in the table term_order
in wp_terms
using the same name in both plugins and being deleted the very moment you remove Intuitive custom post order plugin.
How to mitigate:
testing further, I discovered that uninstalling e deleting Category Order and Taxonomy Terms Order, and then installing it again restores the wp_terms > term_order column, and even if the ordering data are lost, it looks like categories and main menu show back again.
Be aware that I tested this in a simple testing installation, and I’d not rely on this as “the” solution.
@NSP-Code maybe renaming wp_terms
term_order
column to something else in a future release could made the trick.
TL;DR;
if you tested / used Intuitive custom post order plugin and decided to deactivate and delete it, please be careful, mostly If you switched to this one or another sort ordering plugin.
First make a full backup.
Then deactivate Intuitive custom post order.
Finally, remove Intuitive custom post order manually via FTP, in /wp-content/plugins/intuitive-custom-post-order.
This way you’ll be able to delete the plugin without triggering the database column deletion that can cause the conflict.`
[Column 'term_order' in order clause is ambiguous]
SELECT t.term_id, tt.parent, tt.count, tt.taxonomy FROM mydb_terms AS t INNER JOIN mydb_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN mydb_term_relationships AS pll_tr ON pll_tr.object_id = t.term_id WHERE tt.taxonomy IN ('product_categories') AND pll_tr.term_taxonomy_id = 3 ORDER BY term_order ASC
Currently using v3.3.0 of your plugin. By deactivating the plugin, the error disappear. When reactivating, the error comes back.
So probably there’s a need of some little fix.
Could you take a look please?
]]>Here’s the link to the wp_get_object_terms() source:
https://wpseek.com/wp_get_object_terms/
Thanks!
– Fred.
https://www.ads-software.com/plugins/the-taxonomy-sort/
]]>https://wpseek.com/wp_get_object_terms/
https://www.ads-software.com/plugins/custom-taxonomy-order-ne/
]]>$args=array('orderby'=>'term_order', 'order' => 'ASC');
$product_terms = wp_get_object_terms(get_the_ID(), 'category',$args);
when using DESC / ASC it return the same results.
but when using ‘orderby’=>’term_id’ it work perfect and return the right order!!
I’d like to get terms of of a custom post ordered by “terms_order”.
While this works:
$terms=get_terms('tax',array("orderby"=>"term_order"));
this doesn’t work:
$terms=get_the_terms($post->ID,"tax",array("orderby"=>"term_order"));
terms aren’t ordered by “term_order”. Why is that?
I used to order custom taxonomies by this plugin https://drewgourley.com/order-up-custom-ordering-for-wordpress/
]]>https://www.ads-software.com/extend/plugins/taxonomy-terms-order/
]]>I found this code which displays posts by specific category. I just want to do the same thing with tags and using term_order.
<ul>
<?php
global $post;
$myposts = get_posts('numberposts=14&category=8&orderby=name');
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
Please let me know if you have any clues.
Thanks.
]]>