Articles of menus

removing <li> tags from wp_list_pages() using PHP

as the title states, I am trying to remove the <li></li> tags from the list that gets generated with wp_list_pages(). My thinking is to somehow run a for/foreach loop through the menu items and remove the <li></li> tags using str_replace(), but first I would need to parse the returned list into an array or something […]

Remove Metabox from Menus screen

Been digging into WP files for a bit and think I just might be missing something. The end-goal is to remove the Theme Locations metabox from the Menus screen if someone doesn’t have a certain capability manage_options. I know, a little odd for usability, but there’s only one menu and we’re trying to make this […]

Force PDF download from custom menu?

I added a link to a PDF in my custom navigation menu. Is there a way to force it to download instead of open?

Minor css-change based on topmenu – how?

I want to make minor css-changes based on the choice of the top (root) menu. What’s the proper way to handle this in WP? //edit// It’s a website (pages), no blog, and basically, the colors of some links and some images should depend of the choosen top-menu-item. Example, page-structure: * Start * Products * Prod.categ. […]

Adding Additional Menus In Genesis Child Themes

I have a Genesis child theme that I bought, and it only supports two menus, a primary and a secondary. However, for what I would like to do with my site I need to have 6 menus all together. This is my website http://thenottypicalarmywife.com This is what I want the menus to look like http://livingwellspendingless.com […]

Menu styling for last menu item

okay so I’m using the following code to get my links… <?php wp_nav_menu( array(‘theme_location’ => ‘primary’, ‘container’ => ”, ‘menu_class’ => ‘mainnav’) ); ?> This is my CSS for the nav… .mainnav a { font-family: gooddog_plainregular, Arial, sans-serif; font-size: 30px; color: #ffea00; text-decoration:none; } .mainnav li:after { content: url(‘images/nav-divider.png’); } .mainnav li.last:after { content: none; […]

How to change the admin menu “Pages” to something else

When one creates a custom post type you have the ability to define various elements related to that post type which essentially allow you to define things such as the menu title, “add new post” text and stuff like that. What I am trying to figure out is what code I need to add to […]

How to remove div container in custom menu?

all As per my html theme structure i do not want to add my menu <ul><li> under <div>. I am using <?php wp_nav_menu( array( ‘menu_class’ => ‘tlm’, ‘theme_location’ => ‘primary-menu’ ) ); ?> By default this wrap my menu with div. like <div class=”menu-first-container”><ul class=”tlm” id=”menu-first”><li class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-23″ id=”menu-item-23″><a href=”http://localhost/tmw_new/”>Dashboard</a></li> <li class=”hasul menu-item […]

current-menu-item class for custom post type parent

Im having a problem with my menu and custom post type. I have a custom post type of “services”. I have created new page for it called Services. On that page Im displaying a list of all the post from that custom post type. The current-menu-item class is working as itended. But the problem is […]

Remove the whole menu in the admin

How can i remove the whole menu in the admin? I have this code: function remove_menu_items() { global $menu; end( $menu ); while ( prev($menu) ) { $value = explode( ‘ ‘, $menu[ key($menu) ][0] ); if ( $value[0] != NULL ? $value[0] : “” ) { unset( $menu[ key($menu) ] ); } } } […]