Filter admin columns by custom post field value

I have a custom post type called dogs. Within the Add Dog interface, I have a radio-button group that gives choices for color, which are added to the new dog post as meta data. There are about five color choices.

I also have the color field set up to be displayed as a sortable column in the admin area, when I look at all my dog posts. The sorting works as expected.

So now what I’d like to do is have each color value be a link which I can click, and when I click it, it filters all dog posts by that color value. So if I click “brown,” I’ll see a list of only brown dogs.

On Pages, we can click on an Author’s name and see Pages filtered by that author. This is what I’d like, for color and the CPT dog.

I prefer to just do this in functions.php, and not use an enterprise plugin. Is there a way to do this?

Read more here:: Filter admin columns by custom post field value

Leave a Reply

Your email address will not be published. Required fields are marked *