• We have several posts with a custom meta field for country shipped to. (ie. US, CAN, Worldwide, etc.) What I would like to do is have little country icons to filter posts by ship-to country. So clicking on the American flag icon would only show posts where US is in the country custom meta field (there could be more than one country listed in the custom meta field.)

    Any ideas on how to implement?

Viewing 1 replies (of 1 total)
  • J M

    (@hiphopinenglish)

    In short, you could provide users with a form/checkbox to select which shop-to-country they would like to show. Then you take their choice and query for the selected option.
    Workflow could be similar to:
    Create simple checkbox form.
    Validate user choice.
    Write WP_Query passing meta field variables to the query.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Filter by Custom Meta Field’ is closed to new replies.