I looks like you are using the custom meta boxes and fields github repo, which is an awesome library. I think the primary thing you need to do is a new WP_Query. Below is an example of that in action. The only difference is that in my example I made the “Assign to Homepage” a checkbox on the custom post type.
<?php
$args = array(
'post_type' => 'testimonial',
'meta_key' => '_wla_homepage_slider_checkbox',
'meta_value' => 'on',
'post_per_page' => 100, /* add a reasonable max # rows */
'no_found_rows' => true, /* don't generate a count as part of query, unless you need it. */
);
$testimonials = new WP_Query( $args );
?>
From there you can run through your custom loop and pull meta data as needed.
Related Posts:
- How to avoid duplicate posts queried from custom meta?
- loop through custom post-type with two meta_keys
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Custom Post Type – Taxonomy Dropdown Menu?
- How can I add a column/s to wp_posts table?
- How to get custom metabox image field?
- Detect meta value changes when post is updated (post_updated)
- Custom field being erased after autosave
- How to select one major category (or custom taxonomy) for a custom post type?
- Use Custom Post Type as Custom Field
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- Saving multiple Metabox contents
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- Metabox saving values
- add_meta_box: Datepicker like the one for postdate?
- Displaying Meta Box Image
- Get_post_meta() won’t return value
- Multiple information using custom post type
- how to set default value for checkbox in wordpress
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- wp_query to find posts by year and month
- Create a random unique 6 digit number as custom field for custom post type
- Why do I lose the content of meta boxes when I leave the page?
- Dynamically add / duplicate custom meta in custom post types
- WordPress custom meta field for custom post not storing data
- How to Duplicate (multiple meta box)?
- window.send_to_editor and jQuery .attr() conflicts with multiple custom upload image meta boxes
- List of Posts in a Custom Field
- Save an array from drop-down in custom meta box
- Populate Custom Fields in a Custom Post Type?
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Meta Key Value in current-user-only loop
- How to check if user meta field is empty in conditional else statement
- dynamically add a custom field or metabox to custom post type [duplicate]
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Plugin – Combine Meta Box Input Fields into single saveble record
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to use TinyMCE Editor for one of my custom post meta field?
- Cannot save CPT meta box
- Adding Page Templates to post but it ignored it
- Permalinks: custom structure for taxonomy – tags?
- Custom “radio button meta box” not saving correctly
- Add additional field to custom post_type
- Custom Post Meta from custom metaboxes is randomly being deleted
- Add a custom meta box for client to order CPT posts how they want
- Display Repeatable Meta Box Content
- create custom meta box with default value
- What do the numbers mean at the end of add_action(‘save_post’)…?
- A meta box (in a custom post type) with two different type of fields
- How to conditionally add Custom Post Type to Front Page
- hide specific div on single.php [closed]
- How do you output an unknown number of images in a custom post type with desired markup?
- Get data from PHP to JavaScript to set position of each post on front page
- Get post content from another section in custom single page
- Reusable metabox backend and frontend
- Get custom term meta problem on single post type
- Display custom meta on page that has been check in custom post type
- Adding an extra parameter [string] to my posts’ permalink?
- Displaying information from custom field on custom post type
- Add a class to post_class if more than one post shares same meta_value_num
- Get post-meta value of all custom-posts – lowest to highest year-count?
- Add a meta field to the list of results for a custom post type
- Empty meta-box returns publishdate if no value is set?
- Saving metabox keys and storing values as array
- Custom PT, Taxonomys and wordpress query
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- How do I list a custom field and custom taxonomies for each result in a loop?
- How can i loop through custom post type according to custom meta field?
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- when looping through custom post data not appearing
- Custom Metabox Info Not Saving
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Problem with multi checkboxes value in metabox?
- Adding a Section for Visitors
- sorting in wp query based on custom field value
- Custom taxonomy template for custom fields loop [closed]
- Sort loop by custom field from different post type
- check_admin_referer not working in custom meta box for custom post type
- WordPress query in which condition uses custom field
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Error in WP Query. If variable is empty it is displaying previous post value
- WordPress loop, show only one post per custom field
- Avoid another meta box in my custom post type
- Search form to find custom meta box generated data
- How to get past and upcoming post by defining date in custom field?
- Order by custom field attribute
- Get result from Custom Field in Custom Post type
- Filter CPT based on meta box value using Flexible Posts widget?
- Textarea type on one field custom add_meta_box?
- Extending a CPT by Created by another plugin
- Creating entries with image attachements within posts and managing them in a list
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Adding a custom “Add Custom Field” button to Custom Meta boxes
- Show search for data extracted from metabox
- How to consume external API from WordPress post editor and display the response data in the custom field?