WordPress.org

Forums

Filtering a page by custom fields (2 posts)

  1. Neotop3
    Member
    Posted 2 years ago #

    Hi!

    Would it possible to filter a page by custom fields (created with the plugin ACF) and category? We have many articles about music reviews and every review got an "genre". Now, I would like to create pages for each genre (and review). Is this possible?

    greeting
    neo

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Filtering a query on the value of a Custom Field is certainly possible. See this Codex article on Custom Field Parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters

    Allowing viewers to select the value of the field is a different problem that can require quite a bit of code. Here is an article that shows a basic form for the Twenty Ten theme that lets a viewer select a Category and a sort order: http://wordpress.mcdspot.com/2012/09/21/simple-form-to-select-a-category-and-sort-order/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.