dswqw66280 2014-04-10 19:17
浏览 81
已采纳

在自定义菜单中显示页面的子项

I have a custom menu structure created using Appearance > Menu

When on a page I would like to show a menu inside of the page containing all menu items that are children of that page in the custom menu. I can only get wp_get_nav() to display all pages and currently my solution is to use css to hide the other menu items which works but is not particularly elegant.

Any suggestions on how to solve this?

  • 写回答

1条回答 默认 最新

  • doushaqing7080 2014-04-10 21:09
    关注

    Child Pages Shortcode - Once this plugin is installed and activated, simply place the shortcode it gives you where you’d like your list of child pages to appear (e.g. at the bottom of the content on your Parent Page).

    List Pages Shortcode - Inserting the shortcode [child-pages] will give you a simple list like the following:

    enter image description here

    Please test RVSubMenu plugin, see if it works for you. It's outdated, but should work perfectly. You may not want to use a widget, so look for a plugin to display widgets in your page (check out AMR Shortcode Any Widget).

    Here might be a resourceful link I found after a swift search using keywords - children menu items + wordpress

    Some dude made a cool post about your topic - check it out.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划