0

I am trying to find a way to mark certain categories in the backend with some sort of 'featured' flag. I would then retrieve those selected categories and display them on a page.

I couldn't find any featured category plugin which does this; I'm wondering if there is a simple way to do this in WP core.

Note: I don't want featured category index pages, widgets, category images, etc. I simply want to be able to check a box (or similar) next to certain categories, so they are marked as special. Then I need to create a query to retrieve only those.

Is this possible?

  • yes it is possible. – DᴀʀᴛʜVᴀᴅᴇʀ Aug 17 '17 at 17:05
  • The only proper way I can think of is to assign a custom field to categories and then filter them based on that. Take a look at this answer. – Jack Johansson Aug 17 '17 at 17:16
0

Yes! Register a taxonomy.

I usually call it something like "Promotions." (this allows for more to be added easily in the future) From there, create the term "featured."

In your template, uses wp_query to display your featured articles, taxonomy parameters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.