简体   繁体   English

如何在 Wordpress 导航菜单中自动添加类别和子类别

[英]How to automatically add Categories & Sub Categories in Wordpress nav menu

i have a long list of categories and sub categories and even a sub categories of sub categories and it take so much time to pick one by one in menu section of wordpress and then re-arrange the hierarchy of categories and their sub categories我有一长串类别和子类别,甚至是子类别的子类别,在 wordpress 的菜单部分中一个一个地挑选,然后重新安排类别及其子类别的层次结构需要花费很多时间

I search about it and i did not find anything helping about this so I was wondering if any of your guys can help me with any function or suggest me any plugin which can add these categories in menu automatically我搜索了一下,但没有找到任何帮助,所以我想知道你们中的任何人是否可以帮助我解决任何 function 或建议我任何可以自动在菜单中添加这些类别的插件

Thanks谢谢

I confirm a solution with a JC Submenu plugin.我用 JC 子菜单插件确认了一个解决方案。 Works perfect.工作完美。 I used the Astra theme and add a filter in theme functions.php to work on it.我使用了 Astra 主题并在主题 functions.php 中添加了一个过滤器来处理它。

//Enable compatibility with theme custom menu walkers

add_filter('jcs/enable_public_walker', 'jc_disable_public_walker');

function jc_disable_public_walker($default){
    return false;
}

There's a plugin: https://wordpress.org/plugins/jc-submenu/有一个插件: https : //wordpress.org/plugins/jc-submenu/

Its old but still works in some themes.它的旧但仍然适用于某些主题。

Automatically Hierarchic Categories in Menu Plugin @WordPress.org 菜单插件 @WordPress.org 中的自动分层类别

It allows you to automatically add hierarchical categories to WordPress navigation menus using shortcode.它允许您使用短代码自动将分层类别添加到 WordPress 导航菜单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM