First of all, 'post_per_page' => 1 in your code is wrong, right name of the argument is posts_per_page (note the plural in postS_per_page)
then if you want query for a ‘true/false’ field in ACF you have to use
'meta_query' => array(
array(
'key' => 'home_offer',
'value' => '1',
'compare' => '=='
)
)
See ACF docs
Related Posts:
- Getting custom taxonomy from custom post type
- Media library – Limit images to custom post type
- Filter next_post_link() and previous_post_link() by meta_key?
- Automatically fill custom field value on post publish/update
- Make permalinks based on an ACF-field
- ACF Relationships in Custom Post Type Permalink
- List events by month
- Use Custom Post Type as Custom Field
- Query by 2 values of a repeater ACF field
- Pull image from ACF field in a Custom Post Type
- Show ACF field from custom taxonomy and display on the single template
- Get Custom Field Values by Another Custom Field in WordPress
- wp_update_post based function works on existing posts, but not new posts
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Show custom field from custom taxanomy term on custom post type
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- Custom Post type with ACF in REST API, how do I get those values?
- Custom Post Types not showing, custom WP_Query
- Create 3 Level Relations with ACF and WordPress
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Retrieve value of a category’s custom field
- Problem with WordPress query on page using custom fields
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- Bulk Update Custom Fields for Custom Post Types
- Cluster CPT posts to users based on ACF value from their profile on dashboard
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- Stuck in Order by more then one
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- CPT archive admin menu label
- Order Custom Post Type by Custom Field Value
- How to group posts and get a mixed posts and groups view?
- Integrate Custom Post Type Events into Calendar
- Order post by date with ACF
- Adavnced custom fields relationship query plus query inside
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- How to get a custom type post data when it has a connection with another custom type post?
- Custom post type showing same Post on all Pages
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- ACF for custom post type archive pages: which hook to use?
- Distribute Custom Post in different pages
- Advanced custom fields Post Object image field not displaying in custom post type single.php
- Sum and count of custom field values
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- meta query not retrieving posts
- Custom Post Type with Configurable Sidebar via ACF
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- SQL query – get ids – Advanced Custom Fields / WPeC
- How to set a ‘page’ as parent of a custom post type?
- Custom front-end form for adding post – Category problem
- Using ACF values in nested WP queries for CPT with date values in the past
- Create/populate Custom Posts ACF fields from external JSON file
- Query posts by current ACF meta key value on single page as related posts
- Show custom post type event if current day using ACF
- Display Custom Field or Custom Taxonomy in front page /post/product
- Why do my custom post types stop displaying over time?
- Filter posts by their related field’s custom field
- If ACF Post Object post has custom taxonomy term…
- ACF Pro Accessing fields on a Custom Post Type
- Modify Publish Metabox location on CPT
- Some posts not displaying by taxonomy term
- Changing default admin column sorting to an ACF Date Picker field
- Permalink URL connection between two custom types
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Show specific posts with WP_Query using ACF Post object
- Display custom tax in “while” loop
- Autofill advanced custom field with user data
- Advanced search form with multiple custom fields
- Custom post type option page template
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- How to get a custom post type archive paged when using a custom field for post sorting?
- save_post affect creation and deletion
- Can’t pick up a field created with Advanced Custom Fields
- Custom post tag images not displaying with ACF
- How to query posts by meta keys AND under specific category?
- using ACF datepicker to filter posts on a page
- Get post id of permalink for a specific custom post type?
- how to load custom single.php?
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Function that get ACF fields value before saving
- If you’re calling a dynamic css inline style does that div have to be in the loop?
- How to query the content of a specific 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?
- Copying custom field value in to title
- Custom Post-type not returning the right child_of
- How to show animal lineage/pedigree in WordPress?
- Custom Post Type Loop breaking php
- Register a title automatically with a relationship field
- Styling first post using Advanced Custom Fields
- ACF – Query relationship without ID
- ACF Field to set Publish Date – Post Duplication upon Update
- Getting ACF relationship field information
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Why custom search engine only searches in post titles of custom posts?
- Display ACF object field data using Elementor Custom Query
- ACF Pro simple Business Directory – Requesting assistance with created Templates and associated Functions.php Coding
- displaying ACF Repeater Fields in Backend sorted by a subfield
- Advanced Custom Fields Custom Post Types Heirarchy