{"id":16747,"date":"2012-02-06T18:24:04","date_gmt":"2012-02-06T18:24:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/custom-classes\/"},"modified":"2017-09-27T16:05:31","modified_gmt":"2017-09-27T16:05:31","slug":"custom-classes","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/custom-classes\/","author":20482,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"4.8.28","requires":"4.8","requires_php":"5.3","requires_plugins":"","header_name":"Custom Classes","header_author":"Justin Tadlock","header_description":"","assets_banners_color":"293134","last_updated":"2017-11-28 21:07:03","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/themehybrid.com\/donate","header_plugin_uri":"https:\/\/themehybrid.com\/plugins\/custom-classes","header_author_uri":"http:\/\/justintadlock.com","rating":5,"author_block_rating":0,"active_installs":2000,"downloads":27208,"num_ratings":11,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"11"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1737208","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1737208","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"1737208","resolution":"1544x500","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1737208","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1777268","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1777268","resolution":"1","location":"plugin"}},"screenshots":{"1":"Custom classes meta box","2":"Body class output in source code"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[6978],"plugin_category":[54],"plugin_contributors":[77929],"plugin_business_model":[],"class_list":["post-16747","plugin","type-plugin","status-publish","hentry","plugin_tags-classes","plugin_category-security-and-spam-protection","plugin_contributors-greenshady","plugin_committers-greenshady"],"banners":{"banner":"https:\/\/ps.w.org\/custom-classes\/assets\/banner-772x250.png?rev=1737208","banner_2x":"https:\/\/ps.w.org\/custom-classes\/assets\/banner-1544x500.png?rev=1737208","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/custom-classes\/assets\/icon-128x128.png?rev=1737208","icon_2x":"https:\/\/ps.w.org\/custom-classes\/assets\/icon-256x256.png?rev=1737208","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/custom-classes\/trunk\/screenshot-1.png?rev=1777268","caption":"Custom classes meta box"},{"src":"https:\/\/ps.w.org\/custom-classes\/trunk\/screenshot-2.png?rev=1777268","caption":"Body class output in source code"}],"raw_content":"<!--section=description-->\n<p>The Custom Classes plugin allows you to create custom classes for posts (when <code>post_class()<\/code> is called) and for the <code>&lt;body&gt;<\/code> class (when <code>body_class()<\/code> is called).  It creates a meta box on the edit post and edit term screens in the admin with input boxes for adding your custom classes.<\/p>\n\n<p>Custom post classes are added whenever your theme calls the <code>post_class()<\/code> function, which is generally whenever a post is shown.  Custom body classes are added on the single view of the post whenever your theme calls the <code>body_class()<\/code> function.<\/p>\n\n<h3>Like this plugin?<\/h3>\n\n<p>Please consider helping the cause by:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/themehybrid.com\/donate\">Making a donation<\/a>.<\/li>\n<li><a href=\"https:\/\/themehybrid.com\/club\">Signing up at my site<\/a>.<\/li>\n<li><a href=\"https:\/\/wordpress.org\/support\/view\/plugin-reviews\/custom-classes?rate=5#postform\">Rating the plugin<\/a>.<\/li>\n<\/ul>\n\n<h3>Professional Support<\/h3>\n\n<p>If you need professional plugin support from me, the plugin author, you can access the support forums at <a href=\"https:\/\/themehybrid.com\/board\/topics\">Theme Hybrid<\/a>, which is a professional WordPress help\/support site where I handle support for all my plugins and themes for a community of 75,000+ users (and growing).<\/p>\n\n<h3>Plugin Development<\/h3>\n\n<p>If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's <a href=\"https:\/\/github.com\/justintadlock\/custom-classes\">GitHub repository<\/a>.<\/p>\n\n<h3>Will this work with custom post types?<\/h3>\n\n<p>Certainly.  This plugin works with any public post type on your site.  It's not just limited to the \"post\" post type.<\/p>\n\n<h3>It's not working!<\/h3>\n\n<p>Most likely, this means your theme isn't using the appropriate functions (<code>post_class()<\/code> and <code>body_class()<\/code>).  You'll need to talk to your theme author to get them to fix this.  Or, better yet, use a correctly-coded theme from <a href=\"https:\/\/themehybrid.com\/themes\">Theme Hybrid<\/a>!<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Why was this plugin created?<\/dt>\n<dd><p>I wanted a quick and easy way to add styles to my posts without having to make a tag, create a category, or use post formats.  Those solutions are great, but they're not ideal for every situation.  By using a custom class, I have complete control over post styles.<\/p><\/dd>\n<dt>How do I use it?<\/dt>\n<dd><p>A meta box named \"Classes\" gets added to the edit post screen in the admin.  From there, you can input a custom post and\/or body class for individual posts.  On the edit\/new term (category, tag, etc.) screen, a new field labeled \"Body Class\" is also available.<\/p>\n\n<p>Of course, you actually have to style the class in your theme's <code>style.css<\/code> file for anything to actually change on the front end.  This plugin just outputs the classes for you.  It's up to you to decide how to use them.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>The change log is located in the <code>changelog.md<\/code> file in the plugin folder.  You may also <a href=\"https:\/\/github.com\/justintadlock\/custom-classes\/blob\/master\/changelog.md\">view the change log<\/a> online.<\/p>","raw_excerpt":"Allows users to create custom classes on a per-post\/term basis.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/16747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=16747"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/greenshady"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=16747"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=16747"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=16747"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=16747"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=16747"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=16747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}