开发者

how do i add value="1" to current li with wp_list_pages

开发者 https://www.devze.com 2023-04-10 20:28 出处:网络
In my template on my wordpress i have a css menu slider but the pages are listed using the wordpress function wp_list_pages

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号