Tag Info

New answers tagged

0

Okay, I found a solution (and it can be used for any theme, with any plugin as it only uses core WordPress functions). In the menu, name the menu item where you want the user's name to appear with a place-holder (see screenshot below). Example: #profile_name#, #user#, #random# Now, add the following code to the your child-theme's functions.php: ...


0

At the beginning of your function add: if ( has_post_format( 'image' ) ) { return; }


0

Add following CSS code in style.css file of your theme. @media only screen and (max-width: 760px){ .menu-toggle { display: none; } }


0

It seems to me, you are trying to get the ancestors by the actual post, while you most likely should get the ancestors according to the menu item. Why? Because setting up a hierarchy in the menu does not change the actual post, especially the post_parent property won't be changed - in short: (other) post type and menu item (which actually is a post type too) ...


0

Get custom navigation title using page id: function get_custom_nav_title( $menu_name, $page_id ) { $args = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' ...



Top 50 recent answers are included