Title: Custom Post Type Parents
Author: Mickey Kay
Published: <strong>2015-02-03</strong>
Last modified: 2026-03-10

---

Szukaj wtyczek

![](https://s.w.org/plugins/geopattern-icon/custom-post-type-parents.svg)

# Custom Post Type Parents

 Autor: [Mickey Kay](https://profiles.wordpress.org/mcguive7/)

[Pobierz](https://downloads.wordpress.org/plugin/custom-post-type-parents.1.1.3.zip)

 * [Szczegóły](https://pl.wordpress.org/plugins/custom-post-type-parents/#description)
 * [Recenzje](https://pl.wordpress.org/plugins/custom-post-type-parents/#reviews)
 *  [Instalacja](https://pl.wordpress.org/plugins/custom-post-type-parents/#installation)
 * [Rozwój](https://pl.wordpress.org/plugins/custom-post-type-parents/#developers)

 [Wsparcie](https://wordpress.org/support/plugin/custom-post-type-parents/)

## Opis

**Compatible with PHP 8.2**

**Like this plugin? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/custom-post-type-parents).**

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](https://wordpress.org/plugins/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

## Zrzuty ekranu

[[

[[

## Instalacja

#### Manual Installation

 1. Upload the entire `/custom-post-type-parents` directory to the `/wp-content/plugins/`
    directory.
 2. Activate Custom Post Type Parents through the 'Plugins’ menu in WordPress.

## Najczęściej zadawane pytania

### How can I report security bugs?

You can report security bugs through the Patchstack Vulnerability Disclosure Program.
The Patchstack team help validate, triage and handle any security vulnerabilities.
[Report a security vulnerability.](https://patchstack.com/database/vdp/custom-post-type-parents)

## Recenzje

![](https://secure.gravatar.com/avatar/8376f49ee65ef97ac2a9dea7f0952cdaf0189c07a7603122c433a29b94853cdc?
s=60&d=retro&r=g)

### 󠀁[Not working](https://wordpress.org/support/topic/not-working-3601/)󠁿

 [pinguluk](https://profiles.wordpress.org/pinguluk/) 2021-04-23

It looks like this is the perfect match for my issue but it’s not working. Using
WP 5.7 and Custom Post Type UI 1.9.0

![](https://secure.gravatar.com/avatar/733ffb1d8d0a04e421430868edbf398dc3c20685777a70b2ad4242a5952bbdd4?
s=60&d=retro&r=g)

### 󠀁[Does what it claims](https://wordpress.org/support/topic/does-what-it-claims-23/)󠁿

 [chrislhow](https://profiles.wordpress.org/chrislhow/) 2021-03-30

Does exactly what it claims to do. Very useful!

![](https://secure.gravatar.com/avatar/9827e055c6cf4b65976d65c53c4f3ea0c0aa7fd38549ed412dede701c0c52d65?
s=60&d=retro&r=g)

### 󠀁[No longer working on WP 5.0.3](https://wordpress.org/support/topic/no-longer-working-on-wp-5-0-3/)󠁿

 [ryan232](https://profiles.wordpress.org/ryan232/) 2019-02-01

This appears to be exactly what I’m looking for, but it doesn’t appear to be working
for me at this time.

![](https://secure.gravatar.com/avatar/13fd01f51806b002cf97f03bd5c2020fb47fabc223eed314fa05079287a82f14?
s=60&d=retro&r=g)

### 󠀁[Loooooove this plugin!](https://wordpress.org/support/topic/loooooove-this-plugin/)󠁿

 [Andrew](https://profiles.wordpress.org/andrewjohnstrong/) 2018-07-21

This issue (no way to set a parent to a custom post type) had been driving me crazy
for ages until now! Thanks guys 🙂

![](https://secure.gravatar.com/avatar/efa17ac72e4a810ca68ba8e5542bc60647986fdb710503200f3126d58ee9f3dc?
s=60&d=retro&r=g)

### 󠀁[Life saver](https://wordpress.org/support/topic/life-saver-170/)󠁿

 [ikenfin](https://profiles.wordpress.org/ikenfin/) 2017-07-06 2 odpowiedzi

Just what i need! My case: Modified breadcrumbs based on Really Simple Breadcrumbs
plugin. Have page – shops, where i have pods widget with list of CPT(shops). With
this plugin i finally make breadcrumbs structure correctly, without (very) dirty
hacks, just set parent page „shops” to pods post type, and modified breadcrumbs 
code. Thanks!

 [ Przeczytaj 6 recenzji ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/)

## Kontrybutorzy i deweloperzy

„Custom Post Type Parents” jest oprogramowaniem open source. Poniższe osoby miały
wkład w rozwój wtyczki.

Zaangażowani

 *   [ Mickey Kay ](https://profiles.wordpress.org/mcguive7/)
 *   [ MIGHTYminnow ](https://profiles.wordpress.org/mightyminnow/)

[Przetłumacz wtyczkę “Custom Post Type Parents” na swój język.](https://translate.wordpress.org/projects/wp-plugins/custom-post-type-parents)

### Interesuje cię rozwój wtyczki?

[Przeglądaj kod](https://plugins.trac.wordpress.org/browser/custom-post-type-parents/),
sprawdź [repozytorium SVN](https://plugins.svn.wordpress.org/custom-post-type-parents/)
lub czytaj [dziennik rozwoju](https://plugins.trac.wordpress.org/log/custom-post-type-parents/)
przez [RSS](https://plugins.trac.wordpress.org/log/custom-post-type-parents/?limit=100&mode=stop_on_copy&format=rss).

## Rejestr zmian

#### 1.1.3

 * Change CSS classname (from custom- to current-) to match documentation and keep
   the same format for all classes.

#### 1.1.2

 * Fix: memory issue infinitely calling constructor.

#### 1.1.1

 * Fix: widget constructor call throwing deprecated notice.

#### 1.1.0

 * Include posts and pages in customizeable list.
 * Update parent select to show hierarchy indenting for easier use.

#### 1.0.1

 * Fix issue in which custom post types weren’t appearing – code was incorrectly
   referencing `slug`
 * Add admin text to indicate if no custom post types are available to edit

#### 1.0.0

 * First release

## Meta

 *  Wersja **1.1.3**
 *  Ostatnia aktualizacja **4 miesiące temu**
 *  Włączone instalacje **900+**
 *  Wersja WordPressa ** 3.5 lub nowszej **
 *  Testowano do **6.9.4**
 *  Język
 * [English (US)](https://wordpress.org/plugins/custom-post-type-parents/)
 * Tagi
 * [custom](https://pl.wordpress.org/plugins/tags/custom/)[menu](https://pl.wordpress.org/plugins/tags/menu/)
   [Parent](https://pl.wordpress.org/plugins/tags/parent/)[post](https://pl.wordpress.org/plugins/tags/post/)
   [type](https://pl.wordpress.org/plugins/tags/type/)
 *  [Widok zaawansowany](https://pl.wordpress.org/plugins/custom-post-type-parents/advanced/)

## Oceny

 4 na 5 gwiazdek.

 *  [  4 recenzje 5-gwiazdkowe     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=5)
 *  [  0 recenzji 4-gwiazdkowych     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=4)
 *  [  1 recenzja 3-gwiazdkowa     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=3)
 *  [  0 recenzji 2-gwiazdkowych     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=2)
 *  [  1 recenzja 1-gwiazdkowa     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/#new-post)

[Zobacz wszystkierecenzje.](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/)

## Zaangażowani

 *   [ Mickey Kay ](https://profiles.wordpress.org/mcguive7/)
 *   [ MIGHTYminnow ](https://profiles.wordpress.org/mightyminnow/)

## Wsparcie

Masz coś do dodania? Potrzebujesz pomocy?

 [Zobacz forum wsparcia](https://wordpress.org/support/plugin/custom-post-type-parents/)

## Złóż datek

Czy chcesz wesprzeć rozwój wtyczki?

 [ Wspomóż wtyczkę ](http://wordpress.org/plugins/custom-post-type-parents)