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
- 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
- Randomly placed sticky custom posts complemented by blog posts
- How to display the rest of categories on Portfolio filterable
- How to append element after thumbnail
- ‘category__and’ for custom taxonomy?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Custom Taxonomy Not Showing in Menu
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- wp_query to find posts by year and month
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- get_template_part for each level of taxonomy term
- Filter by custom taxonomy slug on a custom post type
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- Am unable to reset a query properly
- get_attached_media() on author page not working
- Get next and previous 3 posts in a term in single post page
- Custom loop with multiple taxonomy queries
- Custom post type multiple loop by taxonomy term
- List custom taxonomy specific to one custom post type
- Display all taxonomy terms, add class if term applies to current post
- Return the latest post from a custom Taxonomy and Post Type
- What’s the WP way to load remaining custom posts?
- What is the best practice for displaying my plugin content in themes?
- Full Custom Post Type List Organised by two Taxonomies
- Plugin fatal error
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- get_the_title() is returning results from previous loop
- Control content before and after custom post type loop
- Show current custom taxonomy
- Custom Post Type not showing in main loop
- My custom taxonomy is only displaying 1 of 3 terms
- get_terms() parent, child and grandchild
- List all Custom Post Type posts excluding certain Taxnomy term
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Most viewed post of custom post type
- Loop and add Specific Categories and Products Images
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- What is the most efficient way to execute recursive complex queries?
- Custom post type page with parameter
- How can I loop at a Specific Taxonomy from a custom post type?
- Custom post type category link redirecting to 404 page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Custom archive page for custom taxonomy and pagination issue
- How to display list of custom post taxonomy terms and their posts (if any)?
- Custom post type paging return home page
- Error 404 change permalink term custom term taxonomy
- Changing CPT permalink
- Excluded Custom Taxonomy Term Posts Displaying in loop
- I have a random letter appearing before my content. Where to start looking for the cause?
- Some posts not displaying by taxonomy term
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- posts_per_page is not working by term
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Show parent category and subcategory once in while loop
- 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
- 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
- Which File Populating CPTs in Slug URL
- Not Able to List CPT Based on Taxonomy Term
- Show posts for current taxonomy
- 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
- Get term_id for each instance of custom taxonomy
- How to internationalize the sub menu name “categories” in 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
- Catergory args causing loop not to show
- 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?
- 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