<?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
- Display current category title on category page
- Inject post (from specific category) between posts in Loop
- Get meta_id along with meta_key and meta_value
- How can merge two arrays values in one array and save in database
- How to handle a custom form in wordpress to submit to another page?
- WooCommerce: How to display item meta data in email confirmation using woocommerce_order_item_meta_end
- List all categories but exclude current post category on single post page
- Compare two meta key values against each other inside the get_posts array?
- Removing WordPress profile fields from non-admins
- Edit category output
- Different background-image by category
- If Meta Checkbox is checked, do something?
- Show custom field if it exists, and show different elements if it doesn’t
- Change description on specific WooCommerce product status change
- Custom field value not saving when it contains a URL?
- tracking number field in Woocommerce order [closed]
- Sort posts by custom fields value using dropdown menu
- how do I get a specific post from a post with a subcategory in WP
- WP grandchild categories in nested ul li
- Creating user status mode in WordPress
- Need Help Fixing My Iframes [closed]
- Get page that displays all children of taxonomy parent
- Trouble checking if custom woocommerce checkout field is empty or not
- Add / Update Custom Fields After Select Pictures in Media Window
- Dilemma of Populating all the categories in a drop down list
- Remove the last X characters of a custom field value
- JSON REST API WordPress only showing first 10 categories
- Why are the details of my todo not saving?
- Can’t save php string to a custom field
- Get all categories post is not in
- Rewrite with pagination /foo/page/2/ to posts of a given category, page 2
- Remove empty terms from array, sort alphabetically, update back to repeating field
- WordPress yoast seo plugin – parse snippet var in meta description
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- Post not populating for custom post type based on category selection
- Handling repeater data
- How to add data to a custom field at the wp_users table?
- Using rules in Posts
- Save the value of a wp_dropdown_pages
- Add a counter for mouseovers (custom field)
- Show field if it has contents on Advanced Custom Fields
- the_meta – no get_the_meta query?
- Remove Custom Post Category In WordPress Slug Using .Htaccess
- Dynamically added custom fields not displayed on WooCommerce email notifications
- get value from get_post_meta then reuse it in another get_post_meta
- How can I add diffrent editable text fields?
- Get main parent category for post (WordPress/Advanced Custom Fields)
- Include custom fields in search
- update_term_meta() only updating once on certain meta keys
- Loop for recently (updated_post_meta) posts?
- Using zip code to display custom data in Admin Order Details
- Generating 3 random numbers and saving them in database
- ACF – Can’t get custom post type by taxonomy
- Link to index.php from home.php?
- update_post_meta Not Processing Array Data (Not Sure What I Am Missing)
- Populate Posts based on category selected using AJAX that means without page refresh
- random woocommerce categories are not showing when count enabled?
- How to Retrieve All Category Images on Front-End
- What syntax is this? “{{post.price}}”
- custom field meta-box with dropdown/autocomplete
- Is there a way to randomize and connect a background and header image?
- If Elseif Query
- get_post_meta is always empty when I use wp_mail
- dynamically filter by category via sub-menu
- Get unique post in parent category
- Incomplete term slugs output from a foreach loop with get_the_terms
- Display custom meta box in my template file
- How to display the date under the post title?
- Too many if’s and else if’s ?? – Must be better way [closed]
- Advanced Custom Fields Show PHP in Text Areas
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Custom Admin Menu Report for Specific User ID
- How to modify default tags in wp_head()