开发者

change the function wp_list_pages in wordpress

I want to do a sitemap for my website, I used in wp_list_pages开发者_如何学C but the function made me only <ul> and <li> tags.

I want to define title with h2 tag and sub pages in h3 tag how can I do it?

Thanks.


you might give these a try:

1 take a look at your CSS and modify the class "pagenav".

or, and it might be better,

2 create a filter, which modifies your layout, and hook it into "wp_list_pages"


I think you need to read this:

By default, wp_list_pages() generates a nested, unordered list of WordPress Pages created with the Write > Page admin panel. You can remove the outermost item (li.pagenav) and list (ul) by setting the title_li parameter to an empty string.

Found it on: http://codex.wordpress.org/Function_Reference/wp_list_pages under the "Markup and styling of page items" section.

I hope it helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜