Forums

wp_list_pages hack to pass in page ID (1 post)

  1. scruffian
    Member
    Posted 3 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Topic