• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Websentia Web Services

Denton-Based Web Designer & Wordpress Developer

  • Home
  • Services
    • All Services
    • Web Services
    • Content Management
    • Technical Support
    • Font Services
  • Web Portfolio
  • Web Hosting
  • Articles
  • Contact Us
You are here: Home / My Little Plugins / Add Body Class with ACF

Add Body Class with ACF

March 10, 2023 By stevehorn

You can use Advanced Custom Fields (free or pro version) and this plugin to add custom body classes to your WordPress pages, posts, and other custom post types.

Here’s how this works:

  1. Install Advanced Custom Fields plugin (free or pro version).
  2. Install Websentia Add Body Class with ACF plugin.
  3. In ACF settings, create a field group (name as you wish).
  4. In your new field group, add a “text” field with the label “body_class” (no quotes).
  5. For ACF display options, choose where you want this to display such as pages or (not “and”) posts, or any custom post type of your choice. You can also limit who accesses based on ACF’s functionalities.
  6. Open a page, post, etc or create a new one. You’ll see a custom field where you can add body classes (separated by spaces such as favorites allowed gardening and so forth). These classes will be added to the body tag for that page/post only.

Filed Under: My Little Plugins

Primary Sidebar

Search This Website

Have you read….?

font editing info

Font License Information – Example ‘Oxygen’

Here's an example of the usage of a free font found at Google Fonts, the font 'Oxygen'. Stored within the font's meta data is the following: Designer information: Vernon Adams, … [Read More...] about Font License Information – Example ‘Oxygen’

WordPress Maintenance

Security, Performance, and Rankings Regular attention and proper maintenance is the number one step to take in avoiding website hacks and potentially loosing your entire website for a few days or … [Read More...] about WordPress Maintenance

Footer

Websentia Web Services

Websentia Web Services is based in the North Texas Area. While we provide digital services for clients around the world, the majority of our client relationships are based on local contact as this oftentimes is of greater value than long distance communications via email, phone, or video conferencing.

Our physical location is in Denton, Texas.

Privacy Policy | Terms and Conditions

Social Media & Your Website

  • Facebook
  • LinkedIn
  • Pinterest
  • Twitter

Search This Website

Go to top

Copyright © 2023 Websentia Web Services • • • All Rights Reserved

This Website Built on the Genesis Platform for Wordpress by StudioPress