Articles of menus

custom walker class for own menu?

i have designed a html template for own blog, in my theme my menu is this structure, <ul class=”right”> <li class=”has-dropdown”> <a class=”active” href=”index.html”>Home</a> <ul class=”dropdown”> <li><a href=”index.html”>Home Page – Default</a></li> <li><a href=”index-type1.html”>Home Page Type 1</a></li> <li><a href=”index-type2.html”>Home Page Type 2</a></li> <li class=”has-dropdown”><a href=”#”>TouchM Sliders</a> <ul class=”dropdown”> <li><a href=”index.html”>Slider Revolution</a></li> <li><a href=”index-flexi.html”>Flexislider</a></li> <li><a href=”index-camera.html”>Camera Slider</a></li> […]

how to check if given page is active page

I am building my own custom menu for custom post type. I have a loop and I need to know if given item is active one. How to this properly? How to compare if given items address (slug, permalink, id or some other appropriate option) is the one that is currently loaded? $args = array(‘post_type’ […]

If child is active add class to parent in customWalker

Im writing a customWalker for the wordpress main navigation area. But i am a little stuck on how to find and add a class to the parent of the child which is active. For instance I have the whole customwalker working perfect, all parents have a active class assigned when they are active, but how […]

wp_nav_menu with WP as pure CMS

I’m trying to use WP as a pure backend CMS for my site. I’ve got a few pages setup in WP e.g. About, Main Page, Sample Page and I can display the content on my own php pages by using get_page_by_title. However when I try to use wp_nav_menu to generate the navigation elements, the links […]

Display pictures instead of text in menus

I am working on a custom theme. In that theme, I am creating a menu called “social” for links to the social sites, such as twitter, facebook, …etc. Now, Instead of text, I would like to display social media icons. How can I do that? Make every menu item an image? Thanks.

Wp_list_pages not showing children with custom page template

I seem to be having problems when using custom page templates using wp_list_pages. These pages are always displayed at the bottom of the website in a menu. The problem is, that they should have a collapsible menu with the children in them, but the children are not showing. These children do not have the same […]

Wp Nav Menu div containers

Hi I’m wanting to create a custom navigation menu that will require creating div containers to hold the SUB-MENU set. In other words I want to do this: <ul class=”left_menu”> <li class=”menu_item droped”> <a class=”top_link” href=”#”>Kurumsal</a> <div class=”dropdown”> <ul> <li><a href=”#”>Hakkımızda</a></li> <li><a href=”#”>Misyon Vizyon</a></li> <li><a href=”#”>Satın Alma</a></li> <li><a href=”#”>Kariye</a></li> <li><a href=”#”>Bayilik Başvurusu</a></li> </ul> </div> </li> […]

how to set the link in wordpress such that on clicking it doesn't open another page but go to the bottom of same page

I have one word press project and in that index page is having 7 menus like home, about, contact, offering, invitation, evolution and downloads now how to set the this links such that on clicking it doesn’t open another page but go to the bottom of same page where i have added contents of each […]

How do I add a menu item to a Pods admin menu?

I’m writing a plugin that will send a notification message to an external queue whenever a menu item is clicked. This function is related to some customized data structures I made using the Pods framework. I’d like to add the menu item under the sub-menu for a certain Pod. The Pod is named “spotlight.” Currently […]

add_menu_page does not render the expected result

I’m trying to accomplish the simple task of adding a new page to the admin area but it seems that I just cannot wrap my mind around this simple function. Via codex, this is how I’m trying to add the page: public function __construct(){ add_action(‘admin_menu’, array( &$this, ‘register_menu_page’)); } public function register_menu_page () { $hookname […]