Add Useful Body Classes
Adds the post type and slug of the current page plus a logged-in or logged-out class to the body tag, for precise CSS targeting.
Snippet Library
3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.
Adds the post type and slug of the current page plus a logged-in or logged-out class to the body tag, for precise CSS targeting.
Adds classes such as role-editor to the admin body tag, so you can write CSS that hides or highlights things for specific roles.
Adds a body class such as "acf-hide-title" when a true/false field is switched on for the current page, so you can change the layout with CSS alone.
Adds body classes such as "has-block-cover" or "has-block-gallery" for the main blocks a post or page contains, so CSS can adapt the header or layout to the content.
Adds a ready-made group of blocks (heading, text and button) to the end of every post, which you can restyle with the block editor's own classes.
Adds classes that put a diagonal corner ribbon on any block (wpide-ribbon-new, wpide-ribbon-sale, wpide-ribbon-popular), handy for pricing columns and product cards.
Adds classes like lang-fr and dir-rtl to the body tag, so you can adjust styles per language, whether the language comes from WPML, Polylang or the WordPress locale.
Adds a "CSS classes" field to every classic widget, so you can style individual widgets from your theme or a CSS snippet.
Adds extra colors to the editor palette only while editing a chosen post type (for example a landing page type), and prints the matching color classes on the front end.
Adds hide-on-mobile, hide-on-tablet and hide-on-desktop classes you can put in any block's "Additional CSS class" field to show it only on certain screen sizes.
Removes a shipping method, such as local pickup or express delivery, when the cart contains a product from a specific shipping class (for example bulky items).
Adds utility classes you can put on any block (hide-on-mobile, hide-on-tablet, hide-on-desktop) to show different content on different screen sizes.
Adds CSS selectors and stylesheet URLs that WP Rocket's Remove Unused CSS must always keep, such as classes added by JavaScript for menus, sliders and pop-ups, so those elements do not lose their styling.
Adds body classes such as wpide-ld-enrolled and wpide-ld-completed on course, lesson and topic pages, so you can style or hide things with CSS depending on the student's status.
Adds body classes such as wpide-llms-enrolled or wpide-llms-completed on course and lesson pages so you can tailor the design for each student.
Adds body classes like wpide-mepr-member and wpide-mepr-123 for each active membership, so you can show, hide or restyle parts of your theme with CSS.
Adds body classes like wpide-pmpro-member and wpide-pmpro-level-2 so you can tailor your theme's look for each membership level with CSS.
Cleans up formatting pasted from Word, Google Docs and web pages when a post is saved, removing inline fonts, colors and sizes, font tags, bare spans and Office classes so text follows your theme.
Strips the author and commenter usernames WordPress adds to body and comment classes, closing a quiet way to discover login names.
Changes the word "Event/Events" used across The Events Calendar's views and admin into your own term, such as Show/Shows, Class/Classes or Session/Sessions.
Adds classes such as site-3 and site-shop to the body tag on every network site, so one shared stylesheet can target individual sites.
Generates margin and padding helper classes such as mt-2, mb-4 and px-3 from a spacing scale, to fine-tune block spacing with an extra CSS class.
Adds your theme's button classes to every WPForms submit button, so forms match the other buttons on your site without extra CSS.
Replaces the comment form's submit input with a real button element that carries your theme's button classes, so it matches the other buttons on your site.