plugin-icon

Custom Post Type Parents

제작자: Mickey Kay·
Set a "parent page" for custom post types that is indicated in menus, lists of pages, and the Simple Section Navigation widget.
등급
4/5
버전
1.1.3
활성화된 설치 항목
900
최근 업데이트일
Dec 22, 2025

Compatible with PHP 8.2

Like this plugin? Please consider leaving a 5-star review.

This plugin is meant to solve the problem of highlighting “parent” pages for Custom Post Types in the menu and lists of pages. It integrates with custom menu output as well as output for any functions like wp_list_pages() that utilize the page_css_class or nav_menu_css_class filters. When viewing a custom post type, the assigned “parent page” will be indicated with standard WordPress classes (e.g. current_page_item) in navigation menus and lists of pages.

Usage

  1. In the admin, navigate to Settings > Custom Post Type Parents
  2. For each custom post type, use the dropdown to select a “parent page”

Menus and lists of pages will now have the appropriate classes applied to the specified parent pages. Additionally, Custom Post Type Parents will apply these classes to Simple Section Navigation widgets, if the plugin is installed.

Classes

Custom Post Type Parents applies the following classes to parent and ancestor pages (all classes are consistent with default WordPress classes and are backwards compatible).

Parent * current-menu-parent * current_page_parent * current-custom-post-type-parent * current-{post type}-parent

Ancestor * current-menu-ancestor * current_page_ancestor * current-custom-post-type-ancestor * current-{post type}-ancestor

무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 6.9
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.