<?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?
- Media library – Limit images to custom post type
- 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
- 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
- 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
- Query Custom Post Types by date (custom field) range
- 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
- Custom Post type and Custom Field WP_Query
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Retrieve value of a category’s custom field
- Replace text in post from cvs
- How can I dynamically add a post to a custom post type which uses a custom field?
- Query & Order posts by custom fields
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Bulk Update Custom Fields for Custom Post Types
- 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
- Tracking changes in admin-page so user gets warning when leaving the page
- Order Custom Post Type by Custom Field Value
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Multiple Frontend Filters Using Advanced Custom Fields
- 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
- Custom fields for custom post type
- 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?
- ACF in wordpress
- How to inherit field value from parent post into in child / sub post
- Custome fields not displayed
- 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?
- Modify Posts from Custom_Post_Type within the plugin
- Sum and count of custom field values
- Methods for development wordpress themes [closed]
- Custom post type in Custom widget – $listItem
- Group by custom field value (start and end times)
- 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?
- Excerpt length: get first paragraph
- How to create repeater field manually, without plugin (ACF Pro)?
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- ACF – Retrieve custom taxonomy from a relationship field
- How to store the third party script with HTML code in the wordpress custom input field?
- How to display custom field in product description?
- 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
- How to show link to product in custom fields?
- Show Post columns to specific users on condition
- Autofill advanced custom field with user data
- Advanced search form with multiple custom fields
- 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
- Create Inclusions and exclusions
- How do I display specific custom posts, and how do I edit a post’s singular page?
- Automatically convert standard posts with custom fields to custom post types
- 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
- Get month and day from a Date Picker custom field
- Search form to find custom meta box generated data
- Custom Info Box at end of posts?
- 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
- 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:/
- ACF Pro simple Business Directory – Requesting assistance with created Templates and associated Functions.php Coding
- How to automatically update ACF field value every year?