Title: Create menu based on Custom Fields
Last modified: August 19, 2016

---

# Create menu based on Custom Fields

 *  [infoorangetree](https://wordpress.org/support/users/infoorangetree/)
 * (@infoorangetree)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/create-menu-based-on-custom-fields/)
 * Hi Support,
 * I currently have a page that is displaying posts from a particular category ‘
   portfolio’ in a grid format. I have also added in extra custom fields for each
   of the posts and would like to use these as a filter to display appropriate posts.
 * This is the current code I am using:
 * <?php
    $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; if($_GET[“
   filter”] == “clear”) query_posts(“category_name=portfolio&showposts=12&paged=
   $page”); else $filter = $_GET[“filter”]; $value = $_GET[“value”]; query_posts(“
   category_name=portfolio&showposts=6&paged=$page&meta_key=$filter&meta_value=$
   value”); ?> <?php while (have_posts()) : the_post(); ?>
 * This is working fine for displaying the posts under the default settings but 
   my question is:
    Is there any way to update the filter and value in the query
   posts using a type of sub menu?
 * e.g.
    Website Graphic Design SEO
 * Each menu item could be clicked on to display only the posts that have that particular
   filter.
 * Any help would be appreciated.
 * regards,
    John Orange Tree Design Studio

The topic ‘Create menu based on Custom Fields’ is closed to new replies.

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [infoorangetree](https://wordpress.org/support/users/infoorangetree/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/create-menu-based-on-custom-fields/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
