View Full Version : Custom ID Attribute on wp_list_pages
22nd May 2012, 02:20 pm
Does anyone know how to add an id attribute to the <li> items generated with wp_list_pages function in WordPress? I've been trying to do this for very long now.
Thanks in advance.
22nd May 2012, 09:00 pm
No idea, but you could use the already set classes as well as some CSS selectors to target the <li> you need.
24th May 2012, 11:32 am
Thanks plenty Vlad. I eventually had to use a plugin that Prisca recommended. It's called classy-wp-list-pages (http://wordpress.org/extend/plugins/classy-wp-list-pages/) and it generates custom ID or Class attributes in your <li> tags.
Powered by vBulletin™ Version 4.0.7 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.