Managed to get the custom field method to work, which saves alot of headache in the long run, solution was simple –
<?php post_class(get_field('the-field')); ?>
Related Posts:
- update_post_meta not working in function
- functions.php inject inline css
- Add options to featured image
- Assign category using custom field?
- How to use max and min values of custom fields
- What WordPress function to use to get meta value by using meta keys?
- Default Custom Field Value Automatically Update
- Redirect to another page using contact form 7? [closed]
- ACF not showing
- How to retrieve the values of a sub-field in the first and last row of an (ACF) repeater inside function?
- Prevent custom field from being updated after first publish
- Programmatically add Yoast meta description after post save
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Perform function on publish AND save (not just save)
- How to change text color depending on the number value (Using javascript)
- Creating a “Related Meta” type field?
- Return ACF Field value function
- Syling Custom Fields echo’s from from functions.php
- Add custom fields after post/page title
- Adding and updating repeating custom field meta data
- warning: trying to access array offset on value of type bool ACF field image group
- How to create an input field, and base the output on spreadsheet data? [closed]
- change the url paths in the stylesheet dynamically
- Removing custom meta data
- Change label for registration Fields
- Please Explain the Importing Process of Multiple Stylesheets for Child Themes
- Custom Attachment Caption Fields
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Post meta not updating
- Function to update post_meta based on existing post_meta
- WordPress function saves a post twice and updates all posts
- Change CSS for logged in users
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- different style sheet for just one page template
- Custom styles.css sheet for visual editor
- Exclude from the query posts with meta_key and meta_value
- Is my code correct to enqueue CSS on a specific page?
- How to get correct value from checked()?
- header_image() with CSS
- Not all CSS elements transferring via parent to child?
- Get array of metakey in all posts
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Get all the posts where meta field with multiple choice has several values checked
- User function to return multiple get_post_meta()
- Split Media Queries in different files!
- Some questions about how proper add 2 CSS file in a WordPress theme?
- Hide custom fields when empty
- Adding class to last list item? Not WP generated
- problem loading stylesheets to wp_head dynamically
- Add php code to wp_print_scripts?
- How to inherit field value from parent post into in child / sub post
- Access category within rss2_head hook?
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- What are the meta fields for an attachment?
- Can set_post_thumbnail be used to remove a thumbnail?
- Compare meta key to current date in pre get post
- WordPress creates new lines in postmeta table on post update
- How to insert class in each list of categories?
- Parent theme styles overriding child theme CSS [closed]
- Saving Post Data in Another Database
- I can’t add CSS with functions.php
- Theme JS is available but theme CSS isn’t
- Proper Way to Load stylesheet on Condition
- Insert Address fields into function
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Default Nav Highlight
- Custom styles in Tiny MCE with an external CSS file
- why can’t i add front.css to my frontpage.php
- get_template_directory_uri() links to child theme not parent
- How to make custom comment fields required
- How add body_class from wp_termmeta
- Using two loops in one WordPress template
- remove/hide wp-editor
- Getting out side of wp root folder from function.php using absolute path
- How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
- Sort and display pages with specific custom field (not tag)
- shorthand syntax for custom fields
- Insert a field with PREG_REPLACE – strange behaviour
- Fill empty custom field with other custom field
- Page Template Won’t Load Correct CSS File
- Hide a div when a custom field is empty
- current_page_item is missing inside wp_nav_menu
- saving/reading custom field value does not work – no value gets POSTed
- define css class in functions.php
- Excerpt length: get first paragraph
- How to get custom image field of specific post id
- Display ACF category image on archive and single template files
- What snippet do I need to type to show my ACF field show up on my theme?
- How to avoid saving empty data to sql while using add_meta_box
- How to Display WooCommerce Product Price in WooCommerce Archive
- Delete images from media library when user deletes an image from ACF Gallery
- Featured Image and Tags problem
- Completely Disable WordPress RSS Feeds
- Override a Post’s URL with Advanced Custom Fields Function
- get_field values for each post on home page using wp_add_inline_style
- WordPress Function Assistance with Loop
- How to show ACF value under post/page title in wp-admin
- How to display an image before title text in menu items
- How to add custom metakey to shop_order page’s searching function?
- wp_set_object_term via js btn frontend