<?php
global $wp_query;
$cata = get_post_meta( get_the_ID(), 'cata', false);
query_posts (
array(
'cat'=> $cata,
'showposts' =>'1000'
)
);
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- BEER ITEM -->
<div class="menu-title">
<span><?php the_title(); ?></span>
</div>
<div class="menu-desc-wrap">
<div class="beer-discripton">
<span></span>
<?php the_content(); ?>
</div>
<div class="percent"><span> <?php echo get_post_meta( get_the_ID(), 'Percent', true ); ?></span></div>
</div>
<!-- BEER ITEM END -->
<?php endwhile; endif; wp_reset_query(); ?>
Related Posts:
- Order category posts by last word of custom field
- Add a “custom field” to a category that can be retrieved when viewing the category page with get_post_meta
- How to update custom fields using the wp_insert_post() function?
- How to display multiple Post meta_key/meta_values by SQL query
- How to use multiple query with same meta key
- Add custom field to attachments in a specific category
- How can update custom meta for all posts
- Use ajax to update_post_meta
- how to increase custom post value by one most efficiently?
- How can I create a list of page titles from custom meta values?
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- Is it possible to retrieve all posts with a certain value for metadata?
- Non-Closing PHP Query in WordPress Loop
- how to get serialized post meta
- WordPress loop by meta key that is an array? and how loop multiple arrays
- How to store multiple custom meta box
- Order a WP_Query by meta value where the value is an array
- Add a custom class to the body tag using custom fields
- Hide a div when a custom field is empty
- WordPress stripping out custom field tags
- How to update custom fields when post is published?
- WP post meta – for loop inside for loop
- When working with a post, almost all wp_postmeta are deleted
- Updating Lat and Lng of posts automatically gives sporadic results
- If custom field doesn’t exist, or exists and it’s true show title?
- Metadata on the WP_Post object
- Importing hard coded custom field into acf field
- hover image appears below placeholder instead of overlayed
- combine Code 1 with Code 2
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- get current product name in functions.php
- Random order of WP_Query results with highest meta value
- tracking number field in Woocommerce order [closed]
- get post based on category chosen in drop down – The ajax method
- How to use transient in this code for related post?
- Creating a related post section based on similar categories
- Swapping wp_dropdown_categories function with wp_category_checklist
- The text box have space character
- how to remove metadata from the posts of my blog?
- Trying to remove post thumbnail with plugin
- Randomly Assign an Image’s Alt Text Based on Data From Post
- Passing the custom field values in the wp_get_current_user array function
- Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)
- Sort posts by custom fields value using dropdown menu
- Proper syntax or method for keeping url in modified isotope / category links
- Custom profile field with birthday. Troubles with
- Filter Select results based on selection
- query in category.php repeats itself
- WordPress – Display array data of a child
- What is an equivalent of single_cat_title for getting the slug of the category?
- Issue adding sub category programmatically
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- wordpress allow user to edit user profile with custom fields
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- how do I get a specific post from a post with a subcategory in WP
- Sort custom meta column by other meta value
- WP grandchild categories in nested ul li
- Grab posts by multiple categories
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to show single category archive
- Move category description below post list in blog
- Creating user status mode in WordPress
- Need Help Fixing My Iframes [closed]
- How to pick the default selected value in wordpress dropdown?
- get_post_meta not working on publishing
- Need help with Google drive API [closed]
- Firing schema via code in functions.php doesn’t work
- Applying A Category to Existing Posts Where Page Title Matches Regex
- Get page that displays all children of taxonomy parent
- Adding number to date not working [closed]
- How can I add extra word in permalink when someone click download button?
- Saving and Restoring a Canvas on A Individual User Basis
- selected option if current category is the value
- Seach custom post type posts only by meta fields?
- How to use thumbnail size of image if I’m only using src to get image
- 3 Slashes appear after Apostrophe in custom fields after updating product-site
- get_template_part based upon post’s category
- how to retrieve a value if a checkbox is checked
- how to save selected option in variable for rest api category filter
- Trouble checking if custom woocommerce checkout field is empty or not
- Two queries for a WP_User_Query search work perfectly apart, but not together
- Setting default category base on theme activation
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Hide subcategories (widget)
- Alert Bar section within WP loop is displaying even though there are no posts
- Let Users Choose Post Categories
- Archive post by meta value + 24hours
- Different post styles depending on category
- Display category name only once inside loop
- auto-populating custom nav with all items from custom post type
- Add / Update Custom Fields After Select Pictures in Media Window
- WordPress update_post_meta updating with empty meta_value field [closed]
- conditional logic for front-end custom field edits
- How to show only subcategories in parent category not parent category?
- Trying to retrieve post meta
- Automatic Shortcode Creation with Custom Fields [closed]
- Custom field values to taxonomy terms