Your custom loop $catquery will override the “current” post, and so the_field will operate on the last post of that loop.
Call wp_reset_postdata() right after your loop is finished (after endwhile;). This will restore the post global to the true “current” post.
Related Posts:
- If Statement is Ignored?
- Why have on every line
- WordPress and event-driven programming – what is it about?
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- Display a selected custom product option in WooCommerce cart
- Custom post type column which compares dates?
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Limit the Excerpt field in WP-Admin in words
- How to create different menu’s for not logged in visitors and for logged in members?
- Custom Loop Pagination on WordPress
- delete an array element when its date expires
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Wrap First Character after in a tag
- Advanced Custom Fields: Post Object – Not returning data [closed]
- How do I implement a .diff changeset from core.trac.wordpress.org locally?
- Random Default Avatar Function
- Importing hard coded custom field into acf field
- Strip characters, Including spaces, for tel: link
- Customizer: Output default value in Customizer CSS
- How can I add multiple ‘tax_query’ arrays via a loop?
- How to add just one specific page to widget without plugin?
- Taxonomy linked to pages
- Change output based on text field value
- Converting HTML Template to WordPress Theme
- Can I install/embed WordPress on a ‘single page’?
- How to check if a meta value has already been assigned to any user?
- Saving an array of dynamic repeater data as post_meta
- Unread Repeater field IMG alt not working
- WordPress admin pointers tour bug?
- Slick + PHP + ACF + JQuery slide reveal not working
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Custom posts in different columns style
- How to create an ACF shortcode with Repeater Field in WordPress? [duplicate]
- Add data-id attribute to child page links
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Display Youtube Time Automate from Key
- How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?
- Where is the PHP code generating an element?
- Basic wpdb update question
- Can I set up a hover animation in CSS depending on a PHP conditional?
- Get ACF options field in PHP acting as CSS
- Conditional multidimensional arrays and array_map
- How can I count ACF sub_field with a certain value
- Integrating Yii2 and WordPress
- WordPress widget and customize.php not working in Ubuntu16.04 VPS
- Custom Registration username_exists / email_exists
- After disabling WPML multi currency, the currency is still handled by the WPML
- How do i wrap woocomerce attribute in list?
- PHP Helper Class to create shortcodes
- Is it possible to add a custom page to a free WordPress site? [closed]
- Advanced Custom Fields [closed]
- Is there a hack for using is_page() within the function.php file?
- save metabox with new values _wp_page_template
- ACF Unexpected T_CONSTANT_ENCAPSED_STRING [closed]
- Get All In One SEO Pack to use custom field instead of Content
- pagination broken – clicking next displays “page not found”
- Create condition for Author bio Social Links
- Foreach loop is unexpectedly outputting an extra empty a tag
- How to store checkbox data for individual users?
- Problems updating nested ACF field groups
- Woocommerce template file outputting tags
- Trying to update Woocommerce meta values
- retrieve “Link Color” value
- Query on a repeater date (acf)
- ACF values to Script with auto refresh
- Advanced Custom Forms PHP formatting for do_shortcode
- Possible to edit custom date field and display?
- ACF Gallery field images donwload
- Create “blank” admin page without having admin-bar/admin-menu for faster load
- ACF under category name in shop page [closed]
- Create Schema in WordPress with PHP
- Create form which redirects to site in network?
- Search only for posts with specific metadata?
- ACF background-color per post in a WordPress loop
- Position a repeated article blocks
- How to associate dynamic PHP page for chosen WordPress tag?
- Only display notification on single post
- Where can I find the declaration of `$_wp_theme_features`?
- Static home page ignored
- How do I routinely extract the thumbnail of the most recent post?
- Display tab title as ‘blog tagline | blog title’
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Showing custom field contents without listing description
- Check if values exists DB
- Widget header unique classes
- why is this content-template not showing any of my blog-entries?
- How to get the count for each taxonomy term
- Save Option on Database
- Select area and checkbox data is not saving?
- Order woo products, but first products must be with acf fields
- In reading settings posts are set to “blog” and I have page-blog.php but no posts
- ACF number less than comparison not working
- Advanced Custom Fields – How do I get field values of a group within a group field type
- Woocomerce custom add to cart button edit functionality [closed]
- Put ACF function output code the_terms
- Advanced Custom Fields Auto Populating Field Values For Nested Repeater FIelds
- create custom post type and populate custom fields using php
- Date not working correctly
- WordPress per ACF – permalink is not working