2 typo & tags
source | link

I'm developing a wordpressWordPress theme with several templates. One template is called "Tabs". If a page with this template assigned has children pages, parts of their contents are shown in tabs on the parent page. Therefore I only want to allow certain templates for the children pages.

Is it possible to modify the list (dropdown) of available templates under certain conditions? Is there a hook to achieve this?

My filter/action should look like this (pseudocode):

if(parent_page->template == 'tabs')
   remove template != 'tab-content'

I'm developing a wordpress theme with several templates. One template is called "Tabs". If a page with this template assigned has children pages, parts of their contents are shown in tabs on the parent page. Therefore I only want to allow certain templates for the children pages.

Is it possible to modify the list (dropdown) of available templates under certain conditions? Is there a hook to achieve this?

My filter/action should look like this (pseudocode):

if(parent_page->template == 'tabs')
   remove template != 'tab-content'

I'm developing a WordPress theme with several templates. One template is called "Tabs". If a page with this template assigned has children pages, parts of their contents are shown in tabs on the parent page. Therefore I only want to allow certain templates for the children pages.

Is it possible to modify the list (dropdown) of available templates under certain conditions? Is there a hook to achieve this?

My filter/action should look like this (pseudocode):

if(parent_page->template == 'tabs')
   remove template != 'tab-content'
1
source | link

Modify available templates (in dropdown)

I'm developing a wordpress theme with several templates. One template is called "Tabs". If a page with this template assigned has children pages, parts of their contents are shown in tabs on the parent page. Therefore I only want to allow certain templates for the children pages.

Is it possible to modify the list (dropdown) of available templates under certain conditions? Is there a hook to achieve this?

My filter/action should look like this (pseudocode):

if(parent_page->template == 'tabs')
   remove template != 'tab-content'