Try this:
<?php
$business_services = get_field( "services_for_businesses" );
//etc...
?>
<div class="section-title">Services for Individuals</div>
<div class="section-text">
<?php the_field('services_for_individuals') ?>
</div>
<?php if ( $business_services ) : ?>
<div class="section-title-business">Services for Businesses</div>
<div class="section-text">
<?php echo $business_services; ?>
</div>
</div>
<?php endif; ?>
</div>
Further abstract the code to meet your needs if you have more than one field to show or hide.
Related Posts:
- Display all values of custom a field created with ACF on a page
- Unique key for each row in a repeater field
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Importing hard coded custom field into acf field
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- How to use thumbnail size of image if I’m only using src to get image
- Advanced Custom Fields – display label and value only if value entered
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- Creating an image from a custom field
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Including Custom fields within the_content
- Delete images from media library when user deletes an image from ACF Gallery
- Query on a repeater date (acf)
- ACF – Can’t get custom post type by taxonomy
- ACF Date fileds to Age Convert [closed]
- ACF number less than comparison not working
- How to update custom fields using the wp_insert_post() function?
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- Update WordPress Custom Field with AJAX on cached page
- Problem with ACF shortcode with Repeater Field in WordPress? [closed]
- how to increase custom post value by one most efficiently?
- Advanced Custom Fields: Post Object – Not returning data [closed]
- ACF: Only get first row of a Repeater Field
- Strip characters, Including spaces, for tel: link
- How can I add multiple ‘tax_query’ arrays via a loop?
- Change output based on text field value
- Passing the custom field values in the wp_get_current_user array function
- Display PHP within HTML values
- Firing schema via code in functions.php doesn’t work
- Unable to write multiple values back to ACF user field – PHP
- Update grandchild repeater field with value per row
- auto-populating custom nav with all items from custom post type
- Sort by page information by Ascending Numbers
- Automatic Shortcode Creation with Custom Fields [closed]
- Custom field values to taxonomy terms
- How would an if statement surrounding a custom field with two variables (holding values) look like?
- Advanced Custom Fields not displaying
- Download PDF after CF7 form submission
- Display custom field on 404 page outside loop
- Only show image from custom field when present
- Hide Heading if ACF Field is empty
- Custom meta box values are not getting saved for my custom post type
- WP_Query: getting posts where custom field exists
- How to show meta value code HTML after x paragraph
- Form search query – displaying ACF “Post Object” field as results
- Accessing values from ACF sub field (flexible content area) in PHP
- Get ACF options field in PHP acting as CSS
- User Meta Value not echoing despite Var_Dump Showing correct string
- How can I count ACF sub_field with a certain value
- Output custom text field as unordered list
- Advanced Custom Fields [closed]
- Order a WP_Query by meta value where the value is an array
- Unable to render custom field after attempt to generate a list of recent post in page template
- Add a custom class to the body tag using custom fields
- Get All In One SEO Pack to use custom field instead of Content
- Conditional On custom field plugin metabox
- Meta boxes only displayed when editing normal (default wp post_type) posts
- WordPress stripping out custom field tags
- Using an “IF” statement based on the existence of custom field
- How to create repeater field manually, without plugin (ACF Pro)?
- Display Post Title From Select Choice Loop in Advanced Custom Fields (ACF) – WordPress
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- Updating Metadata with Shortcode
- How do you save the values from custom fields to a products data
- Problems updating nested ACF field groups
- Is it possible to update the dataset using update_post_meta
- Setting up a cron job to auto update a custom field
- Set ACF on order during checkout
- Advanced Custom Forms PHP formatting for do_shortcode
- Get field value and use as variable in php
- ACF Gallery field images donwload
- ACF under category name in shop page [closed]
- Trying to retrieve meta values from three different meta keys and display in rows
- WP post meta – for loop inside for loop
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- ACF background-color per post in a WordPress loop
- How can I copy an ACF field to AIOSEO field? [closed]
- Store custom field’s multiple values in one user meta key
- Get field in readable word
- WooCommerce multiple custom fields code
- Make sticky post with FacetWP
- PHP for loop not working as intended
- WP_query meta_query slow with OR and DATES
- Get meta_query value by user meta array
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- meta field for numerous links
- Else if Statement for Advanced Custom Fields [closed]
- Include a custom field in mysql query
- Get month and day from a Date Picker custom field
- divide custom field values in div every two values
- Showing custom field contents without listing description
- How to exclude post from being queried based on custom meta value
- How to link a word comprised of a custom field with another?
- get_category only returning details for ‘uncategorized’
- Posts sortable column not sorting properly for custom field numbers
- Search result page – display values from the result’s metaboxes
- Save custom field value to variable for conditional – why is this not working? [closed]
- Order woo products, but first products must be with acf fields
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Custom Admin Menu Report for Specific User ID