Which User Role for Custom Post Type Menu – wp_nav
My first guess would be that he needs to make sure the checkbox is checked for that particular CPT under Screen Options (top right of Appearance -> Menus).
My first guess would be that he needs to make sure the checkbox is checked for that particular CPT under Screen Options (top right of Appearance -> Menus).
The Settings API works just fine on any Admin page; it doesn’t care where it is, as long as you tie the settings form to the registered setting, and provide a valid callback function.
The easiest way to do that would be to inline some CSS in your php template. then you could replace that hardcoded image URL with the users avatar like background-image: url(“‘ . echo $avatarURL . “); You will definitely need to fix your snippet to get the avatar as well though. currently you’re returning the … Read more
how to get the relation between the page and the menu item ? = is there a WP function telling this page is linked to this menu item which has or hasn’t a parent Inside the walker, inside the start_el method (which you mentioned), $item->object_id is the page ID. Otherwise, you need to pull the … Read more
I couldn’t find a way to place an image tag in there, so I did as Tom J Nowell suggested. I added a class and using CSS I made the text disappear and have the logo image appear in its place. It seems to work fine.
I’m not sure if I’ve followed you correctly; but I think you’re trying to build the Menu HTML entirely on your own. If I’m correct, then what you’re trying to do is covered under “Walker” object of wp-nav-menu. You need to write a separate function in your functions.php and then pass the function name as … Read more
The following will display in 4 columns 32 terms max at all (product categories) so 8 items by column. If there is more than 32 terms, it replace the 32th term by “View Categories” custom linked item: <?php ## Settings $items_per_col = 8; // Number of items by column $number_of_cols = 4; // Number of … Read more
In the Appearance > Menus panel, you can expose custom class fields by clicking the “Screen Options” tab at the top of the page. From there, each menu item will have a custom css field labeled “CSS Classes (optional)” where an admin can put any plain text class name.
If your “Events landing page” is a proper WordPress “Page”, which I assume it is, then I think that all you need is: $children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0&depth=1″); On the landing page, you should get the four regions On a regions page you should get the regions children On the individual child pages you’d get nothing I … Read more
Well you’ve Post ID with you. So you can use this custom function to retrieve slug of any post. function get_the_slug( $id=null ){ if( empty($id) ): global $post; if( empty($post) ) return ”; // No global $post var available. $id = $post->ID; endif; $slug = basename( get_permalink($id) ); return $slug; } This in return will … Read more