237 reputation
212
bio website tamilg.in
location Chennai, India
age 29
visits member for 2 years, 8 months
seen Sep 25 '13 at 0:07

I'm a Freelance Web Developer from Chennai, India. Mostly working on WordPress Themes and Plugins.

You can hire me in Elance


Dec
23
comment wp_nav_menu: check if the list item has children and add a class to anchor link
It should work, manually run the query in your db and check if you are getting result for the query. Use debug echo statement to print out query string and the count you get. This is the only way you can get it work.
Dec
23
comment wp_nav_menu: check if the list item has children and add a class to anchor link
@Sergey I doubt if you are using WordPress nav menu. Try removing AND post_type='nav_menu_item' from the query.
Dec
23
comment wp_nav_menu: check if the list item has children and add a class to anchor link
@Sergey it wont make difference. You can use it for any nav menu item. Can you give link to your page where you test it?
Dec
23
awarded  Editor
Dec
23
comment wp_nav_menu: check if the list item has children and add a class to anchor link
@KevinLangleyJr. Thanks for pointing out. I overlooked the question.
Dec
23
comment wp_nav_menu: check if the list item has children and add a class to anchor link
@Sergey Added code as per your request.
Dec
23
revised wp_nav_menu: check if the list item has children and add a class to anchor link
updated response by adding code snippet
Dec
23
answered wp_nav_menu: check if the list item has children and add a class to anchor link