How is ‘products_article_list’ meta returned from in $article_list
?
<?php $article_list = get_post_meta( get_the_ID(), products_article_list', true);?>
Is it a list of ids eg. ‘0601,0603’ or is it an array?
tax_query
terms argument requires an array. See https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters
So if it’s stored as a list of ids all you need to do is explode the list and it should work.
...
'tax_query' => array(
array(
'taxonomy' => 'inputs',
'field' => 'slug',
'terms' => explode(',', $article_list),
),
),
...
Related Posts:
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- How to save the checked boxes?
- How to get only one category of custom post type?
- Using WPAlchemy metabox values in another metabox
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- What’s the difference between same wp functions get_posts(); functions in different form?
- Push metadata in array
- Troubles with saving metabox
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- How can I move (or create another) publish button?
- Add additional field to custom post_type
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- populate array with posts
- Is it possible to use array_walk() to append terms to an array of posts?
- meta query not retrieving posts
- Get meta values from parent post and save in child post
- Custom search for a custom post type in WordPress
- tax_query not working?
- Error get_posts with Custom Taxonomy and OR relation
- Meta box not saving
- Meta Box not being added in plugin
- Meta-Box to add multiple items one at a time and on publish save all
- Add Category names to post lists of custom post type
- How to I add count of custom posts listed in a post as a prefix to its title
- Just the First Metabox what saves the data!
- Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?
- How do I remove all the metaboxes for a custom post type?
- How To Set Custom Post Type Title Without Supports
- How do I programmatically add items of content to a custom post type?
- Add pre-existing meta box to new custom post type
- Dynamic page.php template for custom post types
- Display metabox conditionally
- Combine tax_query and meta_query in WP_Query
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Query for custom post type objects in a taxonomy and with a meta value
- Dynamic Custom Post Type Plugin
- How to filter out post type meta?
- Metabox Populated with a Custom Post Type – How to Output CPT based on Select?
- Is it possible to create a post using a metabox?
- How to Duplicate (multiple meta box)?
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Get posts from a custom post type by child categories of a parent category
- dynamically add a custom field or metabox to custom post type [duplicate]
- Query & Order posts by custom fields
- ACF field key/value to show on taxonomy list
- Query Multiple Custom Posts by Custom Fields
- search suggest – filter post type
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Permalinks: custom structure for taxonomy – tags?
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- Trying to get custom post of a custom taxonomy
- wysiwyg editor don´t export paragraph
- Inefficient Query Confusion
- Custom post type and custom taxonomy 404 on page 2
- Show current user posts in custom post type query
- link featured image to external link
- Multiple wp_editor instances in custom post type using Ajax
- Why the_excerpt() function returns excerpt on the Home page and trimmed content in sidebar?
- Add a meta field to the list of results for a custom post type
- Sets post_parent in custom post type posts automatically based on cpt->page name
- Create a custom post type based on ‘Post’
- How do you make relational post types in WordPress? [duplicate]
- Show the categories the current post has
- How to display “Trash” in my custom post type?
- set object terms after some some time of published post – functions.php
- Why is my custom post content only viewable when signed into WordPress?
- Query custom post type that has a serialized relational advanced custom field value
- Sort custom post column by generated value?
- How to Grab Anime info using Jikan API and fill the value in Metabox
- create a “add icon” field in taxonomies page
- How to search through all child taxonomies using WP_Query?
- Custom post type order by post_title
- Tell wordpress to show a single page instead of an archive page
- Using meta boxes as the title of a custom post type
- PHP Notice: Unidentified index
- Duplicate posts in my custom loop
- Include images from pages in wp search.php results in default wp search
- check_admin_referer not working in custom meta box for custom post type
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- WordPress loop add heading before first of type
- Custom meta box in editor of custom post type not working
- Featured image in custom post is being disabled
- Help ordering custom query by Title, Ascending
- CPT and metabox: create multi checkbox by using array?
- How to make post page unique and show it on home page?
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Custom sortable pages on custom post type
- Custom Search not working
- Toggle a metabox based on a selection
- Custom post type Featured Image popup not working
- Problems with a custom meta_box
- Custom Post-type not returning the right child_of
- How to hide home title on pages and posts?
- show custom post’s post in two different divs [duplicate]
- Custom post type is_singular condtional not working when managing sidebar display
- How to consume external API from WordPress post editor and display the response data in the custom field?