Support » Plugin: Custom Taxonomy Order » Taxonomy list always on wp-admin
Taxonomy list always on wp-admin
-
Hi
I have a lot of taxonomy’s in woocommerce.
Plugin funtions are working fine in the front-end, but a list of taxonomys is constantly visible against the left list in the WP-admin interface. Hard to describe without a screenshot.
The list generated by the plugin, is always visible on every wp-admin page.
I had to disable the plugin to work properly.Thanks,
Wannes
-
Hi Wannes,
I am not sure what is going on.
This plugin adds a menu to your admin-menu with the name Term Order. If you have a lot of taxonomies, there will be a lot of subpages, but they should not be open by default.Is there a way for you to find out what is going on, like maybe CSS that is going wrong?
Hi Marcel,
I disabled the extra CSS’s on my site, but no success.
When inspecting the admin page, removing the element <ul class=”wp-submenu wp-submenu-wrap” style> removed the menu untill refreshed.
I also found out that when i am in the customtaxorder page, the menu is also gone.
Reinstalling the plugin did not work as well.Strange π
When I look at that submenu in the inspector, I only see CSS targeting that
ul
element with CSS defined in admin-menu.css.
When you look in the inspector, do you see more CSS being applied to that<ul class=βwp-submenu wp-submenu-wrapβ
? Is there a CSS file from a plugin or theme involved? Or maybe inline CSS, possibly set by JavaScript?Hi Marcel,
I just tried some basic troubleshooting.
– All plugins disabled, except Woocommerce and custom taxonomy order. –> Menu still visible.
– Removing extra CSS –> Menu still visible.I’m not an expert in CSS codes.
Here is a screenshot with the element inspector:
https://ibb.co/BwV8F1j
If you would like an admin login, let me know, i will share one private.@omegait, here’s something we use as a temporary workaround.
/* Workaround for Custom Taxonomy Order Menu Issues */
function remove_menu_items(){
remove_menu_page( ‘customtaxorder’ );
}
add_action( ‘admin_menu’, ‘remove_menu_items’, 999 );
add_action( ‘admin_menu’, ‘linked_url’ );
function linked_url() {
add_menu_page( ‘linked_url’, ‘Custom Taxonomy Order’, ‘read’, ‘customtaxonomyorder’, ”, ‘dashicons-text’, 1 );
}
add_action( ‘admin_menu’ , ‘linkedurl_function’ );
function linkedurl_function() {
global $menu;
$menu[1][2] = “../wp-admin/admin.php?page=customtaxorder”;
}Hi omegait, I didn’t provide that code.
I have no idea what is going on as well, I haven’t seen this problem myself. If there is some way that I can reproduce this, I would like to know. That way I could look into providing a solution.
Does this CSS do anything for you as workaround?
li#toplevel_page_customtaxorder ul { display: none; visibility: hidden; height: 0; }
Hi Marcel,
Now i see that otomakan provided that code.
That code gave me a site crash.The CSS you provided did not work.
I’ve found a workaround by removing the “customtaxorder” menu.
adding this code to my functions.php removed the menu, and the submenu as well:/* Workaround for Custom Taxonomy Order Menu Issues */ function wpdocs_remove_menus(){ remove_menu_page( 'customtaxorder' ); } add_action( 'admin_init', 'wpdocs_remove_menus' );
I have 569 attributes in Woocommerce.
So i guess to reproduce this problem, install the Woocommerce plugin, adding 569 attributes and after that activating the Taxonomy order plugin will trigger the submenu to be visible.Hi,
This might be what you are looking for:function customtaxorder_menu_remove_woo_pa() { if ( function_exists('wc_get_attribute_taxonomies') ) { $wc_taxonomies = wc_get_attribute_taxonomies(); foreach ( $wc_taxonomies as $taxonomy ) { $page = remove_submenu_page( 'customtaxorder', 'customtaxorder-pa_' . $taxonomy->attribute_name ); } } } add_action( 'admin_menu', 'customtaxorder_menu_remove_woo_pa', 999 );
I don’t think this code should be in the main plugin, since attributes can be color or size, and you might want to sort those terms.
Ah, I found the issue, it is CSS π
The submenu that is not visible gets atop: -1000em;
This fixes it too π#adminmenu ul.wp-submenu { top: -10000em; }
Hi Marcel,
Glad you have found the issue.
Added the funtion to my funtion.php file, and everything looks normal again.Thanks!
- The topic ‘Taxonomy list always on wp-admin’ is closed to new replies.