
內容簡介
Custom Classes 外掛允許您為文章建立自訂類別 (post_class()被呼叫時) 和 <body> 的類別 (body_class()被呼叫時)。它在後台的編輯文章和編輯分類畫面上建立了一個新增自訂類別的輸入方塊的項目。
當您的佈景主題呼叫 post_class() 函數時,自訂文章類別會加入進去,這通常是在文章顯示之時。當您的佈景主題呼叫 body_class() 函數時,自訂的 body 類別就會在文章的單一檢視頁面上加入。
喜歡這個外掛嗎?
請考慮協助這個專案:
捐款。
註冊成為我的會員。
評分給這個外掛。
專業支援
如果您需要這個外掛作者的專業支援,您可以前往Theme Hybrid的支援論壇,這是一個專業的 WordPress 幫助/支援網站,在這裡我維護著超過 7.5 萬個使用者的所有插件和佈景主題的支援。
外掛開發
如果您是佈景主題作者、外掛作者或只是一個程式碼愛好者,您可以在這個外掛的 GitHub 儲存庫上關注它的開發情況。
這可以用於自訂文章型態嗎?
當然可以。這個外掛可以適用於您網站上的所有公開文章型態,不僅僅是限定在「文章」型態上。
它不起作用了!
很有可能,這表示您的佈景主題未使用適當的函數 (post_class() 和 body_class()),您需要聯繫您的佈景主題作者以加以修復,或更好的方法是使用正確編碼的 Theme Hybrid 主題!
外掛標籤
開發者團隊
原文外掛簡介
The Custom Classes plugin allows you to create custom classes for posts (when post_class() is called) and for the
class (when body_class() 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.Custom post classes are added whenever your theme calls the post_class() 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 body_class() function.
Like this plugin?
Please consider helping the cause by:
Making a donation.
Signing up at my site.
Rating the plugin.
Professional Support
If you need professional plugin support from me, the plugin author, you can access the support forums at Theme Hybrid, 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).
Plugin Development
If you’re a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it’s GitHub repository.
Will this work with custom post types?
Certainly. This plugin works with any public post type on your site. It’s not just limited to the “post” post type.
It’s not working!
Most likely, this means your theme isn’t using the appropriate functions (post_class() and body_class()). You’ll need to talk to your theme author to get them to fix this. Or, better yet, use a correctly-coded theme from Theme Hybrid!
