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?
- Exclude a category from WP_Query
- $wp_query->queried_object->ID throws warning: Undefined property
- Select All in Parent Category, Group by Child Category?
- get_query_var() not working in pre_get_posts
- query multiple taxonomies
- The Operator “NOT IN” Does Not Work In tax_query
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- Hide child term posts on parent term pages
- Posts per Page on custom Taxonomy Template
- Post type archive page not working
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- How to get the parent’s taxonomy?
- Sort the main query in subcategories/terms?
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Help with hierarchical custom taxonomies and permalinks…almost there
- Custom Taxonomy List links being re-written
- Want to filter only parent post in admin area
- Archive or taxonomy pages not working for custom post type
- Custom Taxonomy and tax_query Issue?
- Custom post query by taxonomy
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Optimised Code for Pulling Taxonomy Posts
- Show Post Count of a Category
- taxonomy template for custom post type the same as the archive
- How to use WP_Query in a CPT achive page?
- Fetch taxonomies by custom post type id array
- Group custom posts by custom taxonomy names
- How can i skip same post from taxonomy term?
- 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
- Genesis filterable portfolio isotope [closed]
- Wrong request query on cpt and tax
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Search / Filter posts on Title/Content OR Tags
- Custom loop with multiple taxonomy queries
- Extending AZIndex plugin to use custom post types and custom taxonomies
- Custom taxonomy rewrite give pagination 404
- Display custom post type category, while in a CPT category, then the posts beneath
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- What’s the WP way to load remaining custom posts?
- Number of Custom Post Types published are not being shown in the custom page
- How to have this permalink structure: post_type/postname/custom_inner_page
- posttype/taxonomy/term archive page 404 error
- Retrieve custom post types by custom taxonomies with WP_Query
- Using page slug in wp_query
- Custom taxonomy wp_query woes.
- Creating two loops based on different logic
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Different options per post type in WP_Query
- How to show all taxonomies within custom post type loop
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- Show categories of custom post type and not all posts
- Exclude latest post from WP_Query taxonomy term loop
- How to query Posts from a custom post type which contains a custom taxonomy?
- List all Custom Post Type posts excluding certain Taxnomy term
- Foreach loop returning more than one item when querying taxonomy
- Archive page for custom post type and custom taxonomy
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Displaying custom taxonomy menu in custom post type archive
- Sorting the Loop by Taxonomy Value
- custom taxonomy pagination 404 error
- Ordering by meta value not working
- Archive page of CPT’s custom Taxonomy
- Getting Same Description in All the Custom Taxonomy Posts
- custom post type and a “sticky” position taxonomy
- Display post count for a specific month
- pagination problem listing custom post types of taxonomy in wordpress
- Static Front Page not working for custom theme
- WP_Query to display number of custom post type filtered (order by) taxonomy
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Live search by custom tag
- Query a custom taxonomy in a function to create an csv file
- Custom taxonomy with custom post type archive page
- Ajax load more inside custom post type taxonomy
- Only show categories that have posts within custom post type
- Create a custom wp_query from a specific custom post type with specific taxonomy
- Custome post type “tags” pick default archive instead of custom post type archive
- Customize url from the_terms
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Display all Custom taxonomy terms and their relevant custom posts
- Help with Multi Level Category Archive Page
- Custom post type archive page not showing on archive-posttype.php
- Query Pulling the same post twice
- Get posts associated with custom taxonomy alternate way
- Loop with Custom Post Type and Taxonomies
- Pagination fault in custom post type archive page [duplicate]
- tax_query showing no results
- Why is this custom post type defaulting to archive.php?
- How to display elements of different post types?
- Custom taxonomy archive page not routing?
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Attaching multiple custom taxonomies to one CPT?
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- WP Query Conditionally query meta and taxonomy
- WP Query – Can’t get posts with specific taxonomy
- How to work with URLs where sometimes a post or a subcategory is in the same part of the URL structure