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?
- echo value from ‘select’ field type into page template using cmb2?
- How to get custom metabox image field?
- Detect meta value changes when post is updated (post_updated)
- Custom field being erased after autosave
- Order custom posts by a date metabox
- How to select one major category (or custom taxonomy) for a custom post type?
- How to sort CPT by custom meta value (date), and return posts month by month
- How to solve suspected memory issue in custom WordPress loop?
- 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
- Displaying custom posts only if custom meta box’s date is not expired
- 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
- How to insert content from another Custom Post type into Post?
- 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
- WP_Query orderby modified to include custom meta changes
- Keep display metadata value on backend – Custom Metabox
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Meta Key Value in current-user-only loop
- Calculate all custom field values in the post loop
- How to check if user meta field is empty in conditional else statement
- Why is my select meta data not saving?
- 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?
- Visual editor issue by having multiple tiny mce editors in a CPT
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- A better way to add a meta box to custom post types
- 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?
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Grouping metadatas into one
- 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
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- when looping through custom post data not appearing
- Custom Metabox Info Not Saving
- PHP Warning with Custom Fields
- 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
- Simple Data picker meta box
- 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
- Delete custom post type metadata without deleting the post in admin area
- How to check if meta box value is false for all posts then do something based on that
- 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
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Filter CPT based on meta box value using Flexible Posts widget?
- Textarea type on one field custom add_meta_box?
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- Extending a CPT by Created by another plugin
- Custom meta box includes
- 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
- How do I filter a custom post type loop by a field?
- Show search for data extracted from metabox
- Display div based on Group metabox selection [closed]
- How to consume external API from WordPress post editor and display the response data in the custom field?
- custom post type with metabox custom fields