ACF is a third-party plugin and I don’t know what functions it gives you that you could use.
In general, though, you can create a query for posts with a particular custom field and value.
$args = array(
'meta_key' => 'featured', // must match the key that ACF has used
'meta_value' => true, // must match the value that ACF has used
'post_type' => 'product' // must match your post type
);
$the_query = new WP_Query( $args );
Then just run through a secondary loop as normal:
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
// output html for each post here
}
/* Restore original Post Data */
wp_reset_postdata();
} else {
// no posts found
}
Depending on what you want you could put this into your front-page.php
template, hook it into the_content
or turn it into a shortcode.
Related Posts:
- Order get_terms using a Custom Field
- Get value in custom field with taxonomy [closed]
- Remove Category description textarea
- Custom Taxonomy Images with Advanced Custom Fields
- Advanced custom fields – taxonomy terms images [closed]
- Displaying ACF image field [closed]
- Operations with custom fields values in a loop
- ACF vs Taxonomies
- Specifying a size when displaying an image associated with a taxonomy through ACF
- How to add contents of a custom field to a taxonomy term list?
- Search Tool only refreshes Page without showing results
- Display value of custom field of custom taxonomy in single post?
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- WordPress implode & wp_insert_post question
- Website loading slowly – Advanced Custom Fields images
- Display a colour of custom taxonomy on the page
- Can’t get taxonomy ID for each post on archive page
- Loop to display ONLY custom taxonomy parent information [closed]
- Using Advanced Custom Fields Relationship Field to select a taxonomy term
- query to use to link to taxonomy single page
- Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
- Why do my quick edits for custom taxonomies not show on the post frontend?
- Echo ACF taxonomy field within a foreach for another taxonomy
- new custom filed not showing in taxonomy
- Connect ACF field + custom taxonomy [closed]
- Adding Advanced Custom Fields to posts
- ACF Field, hide taxonomy title and image when no nothing selected in post
- ACF Custom field not showing in Timber Taxonomy page
- WordPress search form and search result through ACF field in custom taxonomy
- Creating a list with multiple categoreis and options
- Taxonomies, Adanced Custom Fields and Repeatable Fields
- ACF Display Taxonomy Image Field
- Display posts from specific slug of the custom taxonomy in WordPress
- Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy
- Is there a way to ‘Lock’ a Taxonomy?
- Return only the custom sub-term for custom post type, do not echo term-parent
- wp_insert_term is adding a term that has no name
- Get total number of comments from posts in a specific custom taxonomy
- Display one post from each term in a custom taxonomy [closed]
- Connect Users and Taxonomies
- WordPress json api taxonomy index method
- get_terms showing link to category even if all posts are drafts
- How to restrict on selecting child taxonomy
- Sort Custom Taxonomy Terms in admin by custom order
- Change in custom taxonomy permalink causes 404 error for another custom taxonomy
- Checking if a Page has an Associated Term?
- How get custom field from custom taxonomy?
- Taxonomy.php issue with search and filters
- Move terms from one taxonomy to another keeping the hierarchy
- wordpress testimonials
- Output single post custom taxonomy child terms
- How to check if a post has at least 2 terms from a custom taxonomy attached?
- Removing custom taxonomies from the admin menu
- Custom post type Category Display
- Custom Taxonomy template not display
- Terms Per Page in custom taxonomy Admin
- pre_get_posts post_meta event
- How can I add a custom permalink to a term?
- Custom taxonomy display name issue
- Variable Not Working Inside is_author() Array
- How can I get Taxonomy Images to work with ‘orderby’ argument?
- How do I hide a term from non-admin users in get_the_term_list?
- Query Results not being displayed please help
- Can I output a custom taxonomy as a submenu in the site navigation menu?
- Sort taxonomy page alphabetically by meta rather than default post date
- Random category URLs not working
- Custom taxonomy throw error 404
- using wp_insert_term to create custom terms for a custom taxonomy from frontend form,
- ACF – Retrieve custom taxonomy from a relationship field
- Product custom taxonomy is not found when space in name
- Get Terms of custom Taxonomy of products with certain Product Category
- Create loop from selected terms in ACF taxonomy field
- Sort custom posts by date and then by taxonomy
- Clean Taxonomy terms in new post type wordpress
- How to exclude the common terms?
- Taxonomy shows up twice on Custom Post Type
- Custom dropdown list taxonomy not saved
- WordPress taxonomy terms archive template help
- How to get all the terms from a custom hierarchical taxonomy via REST api?
- Remove taxonomy name and add .html extension in the custom taxonomy term URL
- Pagination for Custom Taxonomy
- Can I make a taxonomy meta box into dropdowns for each parent category?
- Error 404 in Custom taxonomy with pagination
- Best Method to Switch Between Terms (Custom Taxonomy)
- Custom post type term names with ampersand in the term name
- WordPress Taxonomy Permalinks – Custom?
- Need help understanding a rewrite with multi-level taxonomy
- How to query authors by custom taxonomy?
- Display custom post term or taxonomy
- Attaching meta box to specific category/taxonomy in custom post type
- Change Permalink to Value of Custom Field
- Display custom post taxonomies
- Custom Taxonomy type in nav menu
- Advanced search: roles and multiple taxonomies
- Using post type archive page for taxonomy archive
- Custom Fields link to other pages, not search
- Search and filter with custom field in taxonomy
- is_tax not working for custom taxonomy
- Custom taxonomy with custom meta value is not sorting correctly (query returns the same value for orderby regardless of sort column click)
- Custom Sort Order for Custom Post Type Taxonomy