Got help on Facebook and just needed to change this:
<option value="<?php echo $term->name; ?>" <?php if($_POST['mealtype'] == $term->name) { echo 'selected'; } ?>><?php echo $term->name; ?></option>
to this:
<option value="<?php echo $term->slug; ?>" <?php if($_POST['mealtype'] == $term->slug) { echo 'selected'; } ?>><?php echo $term->name; ?></option>
Related Posts:
- How to get_queried_object on multiple objects?
- How to use a custom post type archive as front page?
- How to set a custom post type to have viewable future posts
- $wp_query->queried_object->ID throws warning: Undefined property
- The Operator “NOT IN” Does Not Work In tax_query
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Post type archive page not working
- How to get the parent’s taxonomy?
- Querying Posts by Taxonomy From Alternate Network Site
- Help with hierarchical custom taxonomies and permalinks…almost there
- Should I change these content meta types before building complex archive page?
- custom post type paging not working past page 3
- Getting taxonomy terms used by custom post type
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Archive or taxonomy pages not working for custom post type
- How to create archive page for taxonomy terms within custom post type
- Query for posts in 2 taxonomies
- Optimised Code for Pulling Taxonomy Posts
- WP_Query search posts by custom post type and custom taxonomy
- taxonomy template for custom post type the same as the archive
- Display only post types that are direct children of the current taxonomy
- Is it possible to create a shortcode that will query a post based on taxonomies?
- wp_query to find posts by year and month
- How can I filter by taxonomy on a custom post type’s page?
- Custom Post Type Loop within Shortcode
- Fetch taxonomies by custom post type id array
- Display CPT posts based on specific taxonomy
- Custom template won’t load for a custom post type (custom permalinks used)
- shortcode to show custom post types by category
- Query/list all terms and their custom post count
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Genesis filterable portfolio isotope [closed]
- Get custom taxonomies from multiple posts
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- Create template for taxonomy results limited by Custom Post Type
- Use Custom Post Type archive page for the taxonomies term archive page
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- How can I made custom taxonomies relationship?
- Custom taxonomies relationship
- Number of Custom Post Types published are not being shown in the custom page
- First custom field value (out of several) displayed twice after query
- posttype/taxonomy/term archive page 404 error
- WP_Query orderby and tax_query
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Custom Post Archive is not working
- How to make WP_Query not to show irrelevant posts?
- What’s the name of the custom post type yearly archive template?
- Create an archive page for custom post type with custom taxonomy
- WP_Query() with custom post type and taxonomy — get all terms?
- Variable not working in WP_Query
- WP_query – Filter by tax_query and meta_query using multiple select
- Wp Query with multiple custom tag(taxonomy) by get the terms
- Alphabetically sort a taxonomy.php template by post title
- how to get this tax_query working?
- Permalink problems with custom post type and custom taxonomy
- sort CPT on Custom Taxonomy Archive page
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- Use the custom post type archive for taxonomies?
- display posts of custom post type with custom taxonomy
- Custom Post type date archive for custom taxonomy
- Custom post type and custom taxonomy 404 on page 2
- tax_query (if the terms are empty)
- How to count other posts not having specific taxonomy terms?
- Get posts by category name
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Custom post type category permalinks and archive pages
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- set object terms after some some time of published post – functions.php
- Sort custom posts by date and then by taxonomy
- have to do a while have post to show for two custom post types sharing the same taxonomy?
- Displaying all posts by category and showing content on click
- How to search through all child taxonomies using WP_Query?
- Posts per Page on custom Taxonomy Template
- Tell wordpress to show a single page instead of an archive page
- WP_query sort by taxonomy
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- Custom post type post_type_link gives “page not found” on any other custom post type
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Custom post types not displaying per category
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Custom post type and custom taxonomies display
- WP_Query for CPT with filter by another WP_Query
- How to pass taxonomy terms to WP_Query along with $args?
- WordPress custom post type
- Custom Taxonomy Query by Taxonomny not working
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- Storing/querying custom date data
- WP Query Post Type with same Taxonomy name
- Catergory args causing loop not to show
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Query custom post type and group by taxonomy
- WP Query – Can’t get posts with specific taxonomy