• Hi,
    i’m lokking for a way to display a cloud tag on my search result page.
    My search return only post which have tags, and i want to display a tag cloud wich contain only the tags of the displayed post result.

    any suggestions ?
    thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Take a look at:

    https://codex.www.ads-software.com/Function_Reference/wp_tag_cloud

    You will need to include a widget area in your search template, and use above to limit which tags are displayed.

    I am confident of this basic info but have no full code examples for your specific case.

    Thread Starter Colir

    (@colir)

    …mmm..
    i really don’t see how to do this whith the default wp_tag_cloud function…

    The only way I can think of doing this is to grab the array of posts early on (before the Loop) and run through them – harvesting tags, removing any duplicates and creating a string variable containing a (presumably) comma-delimited list of all tags. Then use the string variable in the include parameter of wp_tag_cloud.

    I think it’s do-able but not straightforward.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display tag cloud on a search result page’ is closed to new replies.