简体   繁体   中英

Wordpress: Filter posts by selection of tags/categories

I have been searching of a way to allow a site visitor to filter posts by selecting multiple tags or categories. I've been searching through the function reference page for a method and online but having no luck.

Let me explain what I a trying to achieve using football/soccer. To start there would be posts containing information for each player on a team. Then on a page of the site we would have buttons/toggles in rows. On the first row you would select a team, the second row of buttons you would select say forwards, and on the third row you would select right-footed.

By clicking on each of these buttons the posts displayed would filter to only show those with matching tags to the options eg forwards. The end result would be at the bottom of the page, the user would be presented with only posts containing information on a player/s from one team that are forwards who are right-footed.

My problem is trying to find a solution to linking buttons or input fields to sorting tags and then presenting the result.

I would really appreciate some help with this either through the use of the function reference page or if there is a plug-in that has slipped past me. My knowledge of WordPress does not stretch to this complexity yet so I have come to you. I hope I have explained what I am trying to achieve clearly enough.

Thanks,

Rob

You could try the facetious plug-in, which sounds like it'd do what you're after: https://wordpress.org/support/plugin/facetious

I've used it successfully before, though it looks like it hasn't been updated for a while.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM