Forums

Selective Parameters for wp_list_pages (3 posts)

  1. bmil21
    Member
    Posted 1 year ago #

    Hello,

    What I am trying to accomplish is adding parameters to only certain pages in the wp_list_pages tag. For example, I would like to add a "<span>" after certain pages and not all of the ones in the list. The example below may better illustrate this...

    wp_list_pages('link_after=<span>hi</span>')-- Again, only apply this to certain pages.

  2. Matt McInvale
    Member
    Posted 1 year ago #

    I'm not aware of a built in way to do this. You can try parsing the output of the function and injecting HTML with PHP. I've done it with jQuery when I needed to add extra content for dropdown navigation.

  3. bmil21
    Member
    Posted 1 year ago #

    Ok, I'll give that a try.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic