Create a variable outside the array and then pass it to the array:
<?php
$catfilm = get_post_meta( get_the_ID(), "mytheme_catfilm", true );
$blog = array(
'post_type' => 'film',
'catfilm' => $catfilm,
'post_status' => 'publish',
'posts_per_page' => 4,
'ignore_sticky_posts' => 1,
);
?>
Related Posts:
- Main query not querying any posts in custom taxonomy template
- % encoded URL giving 404 error in WordPress
- Display all posts in a custom post type, grouped by a custom taxonomy
- How to Add Custom Taxonomy To Woocommerce Plugin
- How to completely disable a taxonomy archive on the frontend?
- register_taxonomy with multiple object type and update_count_callback
- Order custom posts by taxonomy?
- Conditional two level dropdown filter for custom post type
- Show all custom post type posts sorted by custom taxonomy then by another custom taxonomy
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Taxonomy posts on Archive page
- Randomly placed sticky custom posts complemented by blog posts
- Custom Post Type Loop within Shortcode
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- get_template_part for each level of taxonomy term
- Filter by custom taxonomy slug on a custom post type
- Normal pages as children of my Custom Post Type
- Only show posts from a certain category?
- Display CPT posts based on specific taxonomy
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- get_object_taxonomies() returns empty array for custom post type
- Am unable to reset a query properly
- get_attached_media() on author page not working
- Adding a custom post type taxonomy template in plugin
- How to add a custom taxonomy to show up in a custom post type menu?
- Get next and previous 3 posts in a term in single post page
- Loop custom taxonomy to get lists of cutom post types?
- Custom loop with multiple taxonomy queries
- Custom post type multiple loop by taxonomy term
- List custom taxonomy specific to one custom post type
- Show a Category X’s custom post type on Category X archive page?
- Display all taxonomy terms, add class if term applies to current post
- Return the latest post from a custom Taxonomy and Post Type
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Group CPT posts by custom taxonomy
- What’s the WP way to load remaining custom posts?
- What is the best practice for displaying my plugin content in themes?
- Display Custom Taxonomy Alphabetically
- Full Custom Post Type List Organised by two Taxonomies
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Plugin fatal error
- Listing all term items alphabetically / sorting loop
- Display related custom taxonomy posts in sidebar
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Three Most Recent Posts, One Per Term
- get_the_title() is returning results from previous loop
- Custom post type’s extra fields – how to handle?
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- Control content before and after custom post type loop
- looping though custom post types and only return results in a given taxonomy
- List all posts associated under custom taxonomy
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Insert custom taxonomy into category query
- CPT: multiple loops with different terms
- Display title of all custom posts from same taxonomy term on a custom post template
- Loop to display parent categories in custom taxonomy
- Custom taxonomy template for custom fields loop [closed]
- Add active class to foundation 6 tabs while looping categories
- get_permalink() of page the enclosing page not posts
- Which File Populating CPTs in Slug URL
- How to show terms used only for particular custom post type. Filter creation perpose
- Not Able to List CPT Based on Taxonomy Term
- Show posts for current taxonomy
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Custom post types not displaying per category
- Error in WP Query. If variable is empty it is displaying previous post value
- Looping through custom taxonomy in one template
- WordPress query posts by custom post type not workng
- Custom post type with custom taxonomy permalinks
- Custom taxonomy page template
- Associate custom categories to different user IDs
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Loop with Custom Post Type and Taxonomies
- Render custom taxonomy query as single template
- Loop multiple taxonomy in custom post
- Post data in separate divs with incrementing class using WP_Query
- WordPress Custom Post Type and sort by Tags
- Display posts from category in page
- Custom Taxonomy Showing in WP Menu
- Get term_id for each instance of custom taxonomy
- How to internationalize the sub menu name “categories” in Custom post type?
- Order by custom field attribute
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Display Custom Taxonomy of custom post type
- Sorting custom post types by taxonomy (So close)
- Looping taxonomy in taxonomy?
- Listing custom post type items from a couple of custom taxonomies
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- Catergory args causing loop not to show
- display custom post type from register taxonomy
- Get all active posts that are tied to a custom taxonomy for a custom post type
- Custom Post Type urls not working
- How to filter custom post data with AJAX?
- Make term slugs of custom taxonomy available in WP REST API for custom post type?
- Complex Custom Loop with Includes
- Create a WordPress loop that shows posts from a custom post type + filters the posts by taxonomies while hiding empty taxonomies
- Add Custom Taxonomy Terms as CSS Classes for CPT Posts in an Elementor Loop Item Template