In my template on my wordpress i have a css menu slider but the pages are listed using the wordpress function wp_list_pages
i need to add value="1" to the current page that the user is on when im using wp_list_pages, whats the best way to do this?
the current code i am using is-
<?php wp_list_pages('sort_column=menu_order&开发者_运维知识库depth=1&title_li=');?>
wp_list_pages()
adds a class named current_page_item
. You can use this class to style current page item. See here for more details - http://codex.wordpress.org/Function_Reference/wp_list_pages
精彩评论