• Hi

    I am using a plugin which links categories to pages. I want to put a list of pages on the post page, which is easy using wp_list_pages. However I want wp_list_pages to attach the appropriate classes to the list items when the function runs (so that the page associated with this category can be highlighted). I have written a function which gets the right page id for the post’s category, so I think it should be possible to pass this page ID into wp_list_pages, so that it thinks we are on this particular page, and puts in css classes I want.

    I hope that makes sense. I know it’s quite complicated, so I can try and explain in another way if you don’t get me!

    Thanks in advance for your help…

  • The topic ‘wp_list_pages hack to pass in page ID’ is closed to new replies.