Title: Custom Post Type Parents
Author: Mickey Kay
Published: <strong>3 Fevereiro, 2015</strong>
Last modified: 10 Março, 2026

---

Procurar plugins

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

# Custom Post Type Parents

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

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

 * [Detalhes](https://pt.wordpress.org/plugins/custom-post-type-parents/#description)
 * [Avaliações](https://pt.wordpress.org/plugins/custom-post-type-parents/#reviews)
 *  [Instalação](https://pt.wordpress.org/plugins/custom-post-type-parents/#installation)
 * [Desenvolvimento](https://pt.wordpress.org/plugins/custom-post-type-parents/#developers)

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

## Descrição

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

## Ecrãs

 * [[
 * [[

## Instalação

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

## Perguntas frequentes

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

## Avaliações

![](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 Abril, 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 Março, 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 Fevereiro, 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 Julho, 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 Julho, 2017 2 respostas

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!

 [ Ler todas as 6 avaliações ](https://wordpress.org/support/plugin/custom-post-type-parents/reviews/)

## Contribuidores e programadores

“Custom Post Type Parents” é software de código aberto. As seguintes pessoas contribuíram
para este plugin:

Contribuidores

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

[Traduza o “Custom Post Type Parents” para o seu idioma.](https://translate.wordpress.org/projects/wp-plugins/custom-post-type-parents)

### Interessado no desenvolvimento?

[Consulte o código](https://plugins.trac.wordpress.org/browser/custom-post-type-parents/),
consulte o [repositório SVN](https://plugins.svn.wordpress.org/custom-post-type-parents/),
ou subscreva o [registo de alterações](https://plugins.trac.wordpress.org/log/custom-post-type-parents/)
por [RSS](https://plugins.trac.wordpress.org/log/custom-post-type-parents/?limit=100&mode=stop_on_copy&format=rss).

## Registo de alterações

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

## Metadados

 *  Versão **1.1.3**
 *  Última actualização **Há 1 mês**
 *  Instalações activas **900+**
 *  Versão do WordPress ** 3.5 ou superior **
 *  Testado até **6.9.4**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/custom-post-type-parents/)
 * Etiquetas
 * [custom](https://pt.wordpress.org/plugins/tags/custom/)[menu](https://pt.wordpress.org/plugins/tags/menu/)
   [Parent](https://pt.wordpress.org/plugins/tags/parent/)[post](https://pt.wordpress.org/plugins/tags/post/)
   [type](https://pt.wordpress.org/plugins/tags/type/)
 *  [Visualização avançada](https://pt.wordpress.org/plugins/custom-post-type-parents/advanced/)

## Classificações

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

## Contribuidores

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

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/custom-post-type-parents/)

## Doar

Gostaria de apoiar o desenvolvimento deste plugin?

 [ Fazer donativo para o plugin ](http://wordpress.org/plugins/custom-post-type-parents)