Title: Custom Post Type Parents
Author: Mickey Kay
Published: <strong>3. februára 2015</strong>
Last modified: 10. marca 2026

---

Vyhľadať plugin

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

# Custom Post Type Parents

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

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

 * [Podrobnosti](https://sk.wordpress.org/plugins/custom-post-type-parents/#description)
 * [Recenzie](https://sk.wordpress.org/plugins/custom-post-type-parents/#reviews)
 *  [Inštalácia](https://sk.wordpress.org/plugins/custom-post-type-parents/#installation)
 * [Vývoj](https://sk.wordpress.org/plugins/custom-post-type-parents/#developers)

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

## Popis

**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

## Obrázky

 * [[
 * [[

## Inštalácia

#### 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.

## Časté otázky

### 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)

## Recenzie

![](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/) 23. apríla 2021

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/) 30. marca 2021

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/) 1. februára 2019

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/) 21. júla 2018

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/) 6. júla 2017 2 replies

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!

 [ Prečítať všetkých 6 recenzií ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/)

## Prispievatelia a vývojári

“Custom Post Type Parents” je softvér s otvoreným zdrojovým kódom. Do tohto pluginu
prispeli nasledujúci ľudia.

Prispievatelia

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

[Preložiť „Custom Post Type Parents“ do vašho jazyka.](https://translate.wordpress.org/projects/wp-plugins/custom-post-type-parents)

### Máte záujem o vývoj?

[ Prehľadávajte zdrojový kód](https://plugins.trac.wordpress.org/browser/custom-post-type-parents/),
preskúmajte [SVN repozitár](https://plugins.svn.wordpress.org/custom-post-type-parents/),
alebo sa prihláste na odber [vývojárskeho logu](https://plugins.trac.wordpress.org/log/custom-post-type-parents/)
cez [RSS](https://plugins.trac.wordpress.org/log/custom-post-type-parents/?limit=100&mode=stop_on_copy&format=rss).

## Zoznam zmien

#### 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

 *  Verzia **1.1.3**
 *  Posledná aktualizácia **Pred 3 mesiace**
 *  Aktívne inštalácie **900+**
 *  Verzia WordPress ** 3.5 alebo novšia **
 *  Testované do verzie **6.9.4**
 *  Jazyk
 * [English (US)](https://wordpress.org/plugins/custom-post-type-parents/)
 * Značky
 * [custom](https://sk.wordpress.org/plugins/tags/custom/)[menu](https://sk.wordpress.org/plugins/tags/menu/)
   [Parent](https://sk.wordpress.org/plugins/tags/parent/)[post](https://sk.wordpress.org/plugins/tags/post/)
   [type](https://sk.wordpress.org/plugins/tags/type/)
 *  [Rozšírené zobrazenie](https://sk.wordpress.org/plugins/custom-post-type-parents/advanced/)

## Hodnotenia

 4 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/?filter=2)
 *  [  1 1-star review     ](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)

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

## Prispievatelia

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

## Podpora

Máte čo povedať? Potrebujete pomoc?

 [Zobraziť fórum podpory](https://wordpress.org/support/plugin/custom-post-type-parents/)

## Podporiť

Chceli by ste podporiť pokrok tohto pluginu?

 [ Prispieť na plugin ](http://wordpress.org/plugins/custom-post-type-parents)