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

Easy Primary Category

설명

Notice: Currently works only with WordPress Classic Editor, not Gutenberg compatible

Allows you to choose primary category for posts and custom post types.

When the permalink structure includes category, the category marked as Primary, will be used for generating the permalink of the post.

Works with custom post types and custom taxonomies as long as the taxonomy supports hierarchical structure.

스크린샷

  • Click the “Make Primary” button to mark the category as primary.

설치

  1. Add the plugin’s folder in the WordPress’ plugin directory.
  2. Activate the plugin.
  3. Now you will have the ability to make any category a primary category for the post

FAQ

Why I can’t see the “Make Primary” button?

The button is displayed only when more than one category is selected, try assigning other categories to the post, as soon as there’s more than one category selected, the “Make Primary” button will appear.

Developers’ Notes

If you want to fetch posts belonging to a particular term you can use this:
if ( function_exists( 'epc_get_primary_term_posts' ) ) {
/**
* Assuming you want to fetch 10 published posts which have category ID 2
* marked as primary category
*/
$posts = epc_get_primary_term_posts( 2, array(
'post_status' => 'publish',
'posts_per_page' => 10,
'post_type' => 'post',
) );
}

How can I contribute?

Want to contribute to Easy Primary Category? That would be awesome!
1. Reporting bugs or asking questions
2. Submitting Pull Requests
3. Translating in your own language

후기

2019년 10월 7일
I needed to choose the primary category for some posts I was importing from an older site, as Wordpress was choosing the wrong one. This has saved me setting up loads of 301 redirects for the posts!
2019년 7월 31일
Just another thank you here, love it. With a bit of manual coding in PHP I can now determine which category is more suited to a Woo Commerce product instead of the first of many selected.
2019년 6월 29일
Great plugin! Saved me a lot of time while trying to put all my categories in order. Does wonders for SEO and the dreaded duplicate content issue. Works great with WP Version 5.2.2 Thanks for your effort.
2018년 7월 27일
This seems like something that should just be baked right into WordPress by default, but for some reason it just isn’t. Controlling which category gets used for your permalink is a big deal, but WordPress just doesn’t let you manage it. Why? I’ll never know… The only other plugin I found that could do this was Yoast SEO, but that comes with a TON of extra stuff that we just don’t need/want running on our sites. This was an incredible help and a great find! Thank you so much for making this a dedicated plugin!
모든 4 평가 읽기

기여자 & 개발자

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

기여자

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

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

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

변경이력

1.1.1

  • Made code WordPress coding standards compatible.
  • Tested with latest version of WordPress.

1.1

  • Escaping some output values.
  • Better documentation in the code.
  • Strict type checking of all the objects.
  • Added a few empty index files to prevent directory listing on poorly configured servers.
  • Adhering to WordPress PHPCS standards.

1.0

  • Initial public release.

0.1

  • Initial Development.