Wordpress Hack #10: 9 Things You can do with Categories WordPress的哈克# 10 : 9事情可以做的分類
1,561 views - 1561意見者:管Posted in: 張貼於:
1,561 views 1561意見
Please note: This page was originally written in English.請注意:此網頁最初是用英文寫的。
The original post can be viewed原來的文章可被視為 here這裡 . 。
Please note: This page was originally written in English.
The text has been translated using an online service such as Google or Babelfish.
The original post can be viewed here.
Do you use your Wordpress categories to their fullest potential? 你使用WordPress的類別,以發揮最大潛力? I’m going to show you 9 different ways to hack your Wordpress categories into shape! 我要告訴你9種不同的方法來攻破你的WordPress的類別形成!
This is day #10 of這是一天# 10 30 Wordpress Hacks in 30 Days 30 WordPress的技巧30天內 ! !
So you have your categories listed in the sidebar of your blog like everybody else.所以你有所列類別的補注您的博客像其他人一樣。 I’m going to show you 9 more things you can do with Wordpress categories that will be better for you AND your blog.我要告訴你九更多的事情可以做與WordPress的類別,將能更好地為您和您的博客。 At the same time, customizing your blog with these hacks will begin to set it apart and make it different than all the “cookie-cutter” blogs in the blogopshere.與此同時,定制您的博客與這些黑客將開始設置把它拆開並使它不同於所有的“餅乾模子”的博客在blogopshere 。
Top Level Categories : In Wordpress when you create a category, it has to have a preface like www.site.com/category/news. 頂層分類:在WordPress的當您創建一個類,它有一個前言像www.site.com /類別/新聞。 In the “Permalinks” section of your options or settings in your WP dashboard you can change your “category base”, but that’s only to change it from the default “category” to another word you choose.在“永久”一節中的選項或設置在您的可濕性粉劑的儀表板,您可以變更您的“類基地” ,但只有改變它的默認“類”的另一個詞您選擇。 There is (ridiculously) no way to remove it entirely and just have a category be www.site.com/news.有(可笑)沒有辦法刪除它完全和公正有一類是www.site.com /新聞。 With the隨著 Top Level Categories Plugin頂職類插件 installed, it strips out the “category” so your category names CAN be top level all the time.安裝後,剔除了它的“類” ,使您的類的名稱可以被最高層所有的時間。
Folding Category List : Maybe you’re tired of that list of linked categories hogging up a bunch of your sidebar real estate on your blog. 折疊分類列表 :也許您厭倦了這份名單的聯繫類別拱了一堆您的補注的房地產在你的博客。 If so, maybe you would be interested in trying to display them using the如果是的話,也許你有興趣嘗試,以顯示他們使用 Folding Category List Wordpress Plugin折疊類名單WordPress的插件 instead.代替。
Multi-Column Category List : If you’re trying to create a simple sitemap and you just want a page with multiple categories listing your posts, the 多列分類列表 :如果你想創建一個簡單的網站和您只是想要一個網頁有多個類別列出您員額, Multi-Column Category List Plugin for Wordpress多欄分類列表插件WordPress的 may be just what you need.可能正是您所需要的。
Latest Posts from Each Category : If instead you’re creating a theme with an aside or block of recent posts for a page, header, footer, or anywhere - you can use the 最新的帖子從每個類別:如果不是你創造一個主題的撤銷或阻止最近的職位頁面,頁眉,頁腳,或任何地方-您可以使用 Latest Posts from Each Category Wordpress Plugin最新的員額從每個類別WordPress的插件 for that, and it has all kinds of formatting options, as well as comment counts, dates, and more. ,以及它的各種格式選項,以及評論數量,日期,以及更多。
Author Assigned Categories : If you have multiple authors in your Wordpress blog this plugin will be helpful to you. 作者指定的分類:如果您有多個作者在您的WordPress的博客此插件將有助於你。 You can assign certain categories to certain authors so that they won’t be able to post in categories you don’t want them to.您可以指定某些類別的某些作家,使他們將無法在類別後你不想讓他們。 It works with “user levels” so you could assign say the “news” category to only “reporters”, etc. Very helpful if you have an admin, editor, and then some writers - all with different roles or permissions.它與“用戶級別” ,這樣您可以指定說, “新聞”類唯一的“記者”等非常有益的,如果你有一個管理員,編輯,然後有些作者-所有這些不同的角色或權限。
Category Icons : Lots of other blogging platforms have the ability to assign little pictures or “icons” to categories that you can use in your posts or the sidebar. 類別圖示 :很多其他的博客平台有能力分配小的圖片或“圖標”的類別,您可以使用您的文章中或補注。 Wordpress does not. WordPress的沒有。 That’s why I wrote the post這就是為什麼我寫了後 Very Easy Wordpress Theme Hack: Show Category Images很簡單哈克WordPress的主題是:展示類圖片 , which involves uploading the images in FTP yourself to a directory you create and then inserting some PHP code in your template files. ,其中包括上傳圖片的FTP給自己創建的目錄,然後插入一些PHP代碼中的模板文件。 The那個 Category Icons Wordpress Plugin類別圖標WordPress的插件 automates all that nonsense, and even has additional options that hack couldn’t provide.自動化所有胡說八道,甚至更多的選項,黑客無法提供。 Now it’s easy to upload and assign images to all your wordpress categories.現在可以輕鬆地上傳圖片,並指派為您的所有WordPress的類別。
Category Pages : This plugin can solve all the worries of many people that have been commenting on my 分類網頁 :此插件能夠解決所有的疑慮,許多人已經在我的評論 Better SEO and $$$ with WP Category Templates更好的搜索引擎優化和$ $ $與可濕性粉劑類模板 post.職位。 I wrote that post because it was the first way I figured out to place original content on every category page for better search indexing.我寫這個職務,因為這是第一次,我想出把原來的內容,每個類別頁面的更好的搜索索引。 In entailed creating a separate category template file for every category with a few paragraphs of original content in each.在需要創建單獨的一類模板文件為每個類別的幾段的原創內容在每個。 If you switch themes, you might have to rewrite them - it was a solution, but also a big hassle.如果您切換主題,您可以重寫他們-這是一個解決辦法,但也是一個大麻煩。 With the隨著 Category Page Wordpress Plugin類別網頁WordPress的插件 , it allows you to “write” a Wordpress page and then “assign” it to a category. ,它可以讓你“寫”一個WordPress的網頁,然後再“分配”給一個類別。 So basically, then this plugin puts the contents of this page at the top of whatever category you assign it to.所以基本上,那麼這個插件把此網頁的內容上方的任何類別的指定它。 I don’t think that this is the best solution - but it is a solution that’s better than the original one I had.我不認為這是最好的解決辦法-但它是一個解決方案,優於原來的我。 I will give you other options to this coming up.我會給你其他的選擇這個未來行動。 I have not installed this plugin, and the thing that I question is whether or not all the pages will show in the “Pages” section of your sidebar.我還沒有安裝此插件,以及東西,我的問題是,是否所有網頁將顯示在“網頁”一節的側欄。 You could easily exclude all the ones you created to associate with categories, but that could be very tedious.你可以很容易地排除了所有那些你建立聯繫的類別,但可能是非常乏味的。
Page Category Plus : This is a unique plugin that could be confused with the Category Pages one, but it does yet something different. 網頁類別加:這是一個獨特的插件,可混為一談類別的網頁之一,但它確實沒有什麼不同。 The那個 Page Category Plus Wordpress Plugin網頁類加WordPress的插件 allows you to assign categories to Pages.可以讓你指定類別的網頁。 You know how you get to choose categories whenever you write a post, but you don’t have that choice when you write pages?你知道如何去選擇類別時,你寫文章,但你沒有這樣的選擇時,你寫網頁? Now you have that ability once this plugin is installed.現在,你有這種能力,一旦此插件安裝。 So if I install this plugin and assign my所以,如果我安裝此插件,並指派我 30 Wordpress Hacks in 30 Days 30 WordPress的技巧30天內 “page” to my “網頁”我的 Wordpress Category WordPress的類別 - it will show up on the same page as my posts now. -它會顯示在同一頁上作為我的職位現在。 WOW - will this plugin make my job of organizing this (and other) blogs a whole lot EASIER!魔獸-將這個插件讓我的工作,組織本次(和其他)整個博客容易得多!
Manage Category Descriptions : This is IMHO “the solution” to having original content on category pages for good SEO and more indexed pages. 管理類別說明 :這是IMHO “的解決方案”具有原創內容分類網頁上的良好徐章勳和更多的索引的網頁。 In your Wordpress dashboard go to “Manage -> Categories” and then click on that category to edit it.在你的WordPress的儀表板轉到“管理-> ”類別“ ,然後按一下該類別進行編輯。 Give your category a “description”.讓您的類的“說明” 。 Next, if you created any category templates like category-6.php, delete them.下一步,如果您創建任何類別的模板類一樣, 6.php ,刪除它們。 And then on your archive.php (or cateogry.php if you have one) find this section of the code:然後在您的archive.php (或cateogry.php如果有)找到本節代碼:
<?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h2> That’s the part of the template that say “if this is a category page, then show the title”.這部分的模板,說: “如果這是一類網頁,然後顯示的標題” 。 Well, all you have to do is paste in one line of code directly below that to print the description for the category out:那麼,所有您需要做的是粘貼在一個代碼行下面直接打印描述了一類:
<?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h2> <?php echo category_description(); ?> Of course, you don’t repeat those first two lines, you just copy the third one for the description in your template.當然,你不重複這些頭兩行,你剛才複製的第三個中的描述您的範本。 You can also put it in a div, style it, give it a border or background color to make it stand out, etc. I personally believe that this is a much better way to display original content on category pages than either a plugin or individual templates, because it doesn’t have to create any extra pages or template to worry about.您也可以把它在一個專區,風格它,給它一個邊界或背景顏色,使之脫穎而出,等等我個人認為,這是一種更好的方式來顯示原始內容分類網頁超過任何一個插件或個人模板,因為它沒有創造任何額外的網頁或模板可擔心的。 In addition, you could use the descriptions for other things on your blog in other places if you wanted.此外,您可以使用說明的其他事項外在你的博客在其他地方如果你想。
I hope that you derived some benefit from my category hacks - and may your chisel your Wordpress blog into more of “your own” each and every day.我希望你產生一些受益於我國類黑客-可能您的鑿子您的W ordPress的博客到更多的“自己”的每一天。 Once again, if you have anything to add to make this hack page any better, or a question - please comment now!再次,如果您有任何補充,使這個黑客網頁任何好轉,或一個問題-現在,請評論!
Tags:標籤: wordpress-hacks WordPress的,黑客



























May 1st, 2008 at 7:58 am 08年5月1日在上午07時58分
I get random emails about updates on comments and last night was one of them.我收到的電子郵件大約隨機更新的意見和昨晚是其中之一。 . 。 . 。 seen the added comment about categories and I see you’ve ran with it!看到評論說類別和我看你已經跑呀!
Using the description is one of those obvious and brilliant things we’ve all over looked!使用說明是其中的一個明顯和燦爛的事情,我們都在期待! This certainly makes it a lot easier to keep track of things.毫無疑問,這使它更容易掌握的東西。 I liked the idea the commenter had about using setting up your description in your favorite html editor and just paste the code it.我喜歡的想法的評論對使用設定您的描述您最喜愛的HTML編輯器和公正的代碼粘貼它。 Works great.偉大的工程。
I spoke with the author of the category page plugin.與我交談的作者類別頁面插件。 He’s trying to add functions for tags in his next update.他試圖添加功能的標記,他的下一次更新。 However, the new way of using the description makes the current plugin obsolete.然而,新的方式使用的描述使目前的插件已經過時。 One less plugin is always good for me少了一個插件始終是為我好![= [ ]](http://www.jtpratt.com/wp-includes/images/smilies/11.gif)
So.因此。 . 。 . 。 who’s the genius that’s going to provide the next brilliant way to add content to the tags???誰是天才這將提供未來輝煌的方式添加內容的標記? ? ?
thx 172
Charles查爾斯
May 1st, 2008 at 9:17 am 08年5月1日在上午09時17分
@Acupuncture: Tags I’m not sure about, because that’sa feature that’s only been in WP since 2.3, and you’ve only been able to manage tags since this latest 2.5 release. @針灸:標籤我不知道,因為這是一個功能,只有在可濕性粉劑2.3以來,您只能夠管理標籤,因為這最新的2.5版本。 In addition, I’m not sure I want to manage all my tags pages, so I may just want to block them from indexing using my wpSEO plugin and concentrate on pages, posts, and category pages…此外,我不知道我想管理我的所有標籤頁,所以我可能只是想阻止他們使用我的索引wpSEO插件並專注於網頁,職位,類別頁...
May 2nd, 2008 at 11:04 am 2008年5月2日在上午11時04分
[...] enough? [...]就夠了嗎? Well, it turns out that they can be used for a lot more.哦,原來,他們可以用於很多。 JT posted his ideas about categories and i thought it was definitely worth mentioning here!日本煙草公司公佈他的想法的類別和我想這肯定是這裡值得一提! Using this idea gets rid of the plugin [...]利用這一想法得到擺脫插件[...]