我希望href上的菜单ID点击wordpress,因为我动态使用菜单ID将子菜单列为子菜单
<?php
$menu=$wpdb->get_var( 'SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key="_menu_item_object_id" AND meta_value="'.$post_id.'"' );
$args = array(
'menu' => 'main',
'submenu' => (string) $menu
);
wp_nav_menu( $args ); ?>
答案 0 :(得分:0)
DIV