이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Primary Categories

설명

WordPress plugin for setting and displaying primary categories for posts and custom post types*.

This plugin creates a meta box on the post edit screen titled “Primary Category” containing a drop down menu populated with all categories associated with that post**. Selecting a primary category and updating the post saves this data into a custom field with a meta key of “primary-category”.

To display a list of all posts with a particular primary category, use the shortcode [primary-category name=”cat_name”] where cat_name is the name of the primary category you wish to display. If a name is not specified, the shortcode will default to all posts with “uncategorized” set as the primary category.

*Note: Custom post types must support both categories and custom fields.

**Note: As new categories are added to a post, the post must be updated before those new categories will be available for selection as a primary category.

스크린샷

설치

This section describes how to install the plugin and get it working.

  1. Upload the ‘primary-categories’ directory to your ‘/wp-content/plugins/’ directory, or install the plugin through the WordPress plugins screen directly
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Select the primary category for each post via the post edit screen
  4. Place shortcode to the content of any post type or access the data via the post meta key ‘primary-category’

FAQ

How can I access the primary category data?

A post’s primary category is stored in the post meta under the key ‘primary-category’.

What shortcode can I use to display posts with a particular primary category?

[primary-category name=””]

*Note: Name should reference the primary category that is to be displayed, if no name is specified, the name parameter defaults to ‘uncategorized’.

Why isn’t the category I added available as a primary category?

Users must update a post after adding a new category before that category will be available as a primary category.

후기

2017년 6월 29일
The plugin does just what it says. The code is well-structured and seems very lightweight. What would make it 5 stars were: – possibility to control which post types the plugin applies to by filter – localization – (perhaps out-of-scope) allow developers to control which taxonomy is used on each post type by filter (custom post types often have custom taxonomies as well)
2016년 9월 3일
Thanks Jacob for this plugin, works fine and is very usefull.Keep update when need it because it,s a necesary plugin. Five Stars, thanks.
모든 2 평가 읽기

기여자 & 개발자

“Primary Categories”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Primary Categories”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0.0

Initial Commit