<?php
$the_query = new WP_Query(array(
'post_type' => 'our-partners',
'posts_per_page' => 1,
'order' => 'DESC'
));
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post();
if( have_rows('slider_partenaires_hp') ): //"slider_partenaires_hp" is the repeater field
// loop through the rows of data
while ( have_rows('slider_partenaires_hp') ) : the_row();
// display a sub field value
echo "<li class="partenaire-slide"><img src="" . get_sub_field("logo_partner') . "'></li>"; //"logo_partner" is the item inside the repeater field
endwhile;
else :
// no rows found
endif;
endwhile;
endif;
wp_reset_postdata();
?>
This has to work
Related Posts:
- WebP Fallback for Inline Background Image in Style Attribute
- Redirect to another page using contact form 7? [closed]
- Custom post types, disable fields
- Custom post type that lets users create a set of posts?
- How to display value of custom fields in page
- Media library – Limit images to custom post type
- Development of a WordPress Search Plugin – Best Practices
- Filtering a WP_Query meta_query by numeric values isn’t working
- Automatically fill custom field value on post publish/update
- echo value from ‘select’ field type into page template using cmb2?
- Filter a custom field based on selection of another custom field (ACF) [closed]
- ACF Relationships in Custom Post Type Permalink
- How to sort a table of custom posts by column containing custom field
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- List events by month
- Use Custom Post Type as Custom Field
- How to retrieve custom field types for all posts in WordPress/PHP?
- Display posts if a custom field value is equal to another custom field value
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Get Custom Field Values by Another Custom Field in WordPress
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- How to have the right design for a custom post type without accessing themes
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- “add_post_type_support” with Custom Post Type & ACF
- ACF simple text field value not showing
- How to change post featured image using a custom field of category?
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Retrieve value of a category’s custom field
- How can I dynamically add a post to a custom post type which uses a custom field?
- Query & Order posts by custom fields
- Bulk Update Custom Fields for Custom Post Types
- WP_Query order by custom field, then randomly order some of results
- Query custom post type with ACF Date
- Meta Query Not Returning Output Despite Having Matching Values
- ACF From & To Date Validations
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Dynamic dropdown select values depending on other custom field value
- How to render a custom post type template with custom fields using shortcode
- Order Custom Post Type by Custom Field Value
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Integrate Custom Post Type Events into Calendar
- Displaying custom field according to date
- custom comments form for custom post type
- Query based on custom fields start and end date
- Warning: Invalid argument supplied for foreach() [closed]
- How to get a custom type post data when it has a connection with another custom type post?
- How to create multiple editor?
- ACF in wordpress
- List of users that clicked a ‘Join’ button at single post
- How to inherit field value from parent post into in child / sub post
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- Custom post type’s posts are not showing anywere but in xml sitemap
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Sum and count of custom field values
- Methods for development wordpress themes [closed]
- Custom post type in Custom widget – $listItem
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Excerpt length: get first paragraph
- How to create repeater field manually, without plugin (ACF Pro)?
- ACF – Retrieve custom taxonomy from a relationship field
- How to store the third party script with HTML code in the wordpress custom input field?
- Create if else for post types in WP_Query ‘post__in’ values
- How to display custom field in product description?
- Display Custom Field or Custom Taxonomy in front page /post/product
- How to access repeater field of a custom field?
- Filter posts by their related field’s custom field
- Problem with multi checkboxes value in metabox?
- Permalink URL connection between two custom types
- filter using custom fields
- Autofill advanced custom field with user data
- Advanced search form with multiple custom fields
- Simple Data picker meta box
- Looping through image object using ACF and CPT UI [SOLVED]
- Run query on specific admin options page and send results to select field in another function
- Values show up in custom home page but not in custom post pages
- How do I display specific custom posts, and how do I edit a post’s singular page?
- Fixed custom fields depending on posttype/category
- Custom Fields through plugin in a Custom Post Type
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- WordPress is giving a warning but my code is working fine
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Can’t pick up a field created with Advanced Custom Fields
- How to load custom post type plugin after acf options page (or get settings from there another way)?
- Loop carousel slider in wordpress
- Custom Fields as Post Type Options
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Function that get ACF fields value before saving
- Author profile comments system
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Custom post type and custom taxonomy archive inaccessible
- How to show animal lineage/pedigree in WordPress?
- Extending a CPT by Created by another plugin
- ACF – Query relationship without ID
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- Post object GUID adding http:/