WordPress custom post type page as page parent

I have a problem with WordPress.

I would like to have a custom post type page as page parent.

Read More

For example :

Custom Post Type :
-Custom Page 1
-Custom Page 2
-custom Page 3

Page : 
-Page 1
-Page 2
-Page 3

I would like for example to have Custom Page 1 as Parent to Page 1.

The problem is that I’m just allowed to add a page as parent to another page.

Does anybody have an idea ?

Thanks !

Related posts

Leave a Reply

1 comment

  1. to create custom page type-you must create name.php file and write here

    <?php 
    /*
    Template Name: NameOfTourPageType
    */
    ?>
    

    and when you the page is created, you must change page template from default to NameOfTourPageType in right menu.

    Here is the example for video post type, copy it to fonctions.php. and create single-video.php and taxonomy-video.php files.

    function create_my_taxonomies() {
           //Custom taxonomies for "Media" custom post type
       $foodTaxLabels = array(
         'name' => __('Videos taxonomies'),
         'singular_name' => __('Videos taxonomy'),
         'add_new' => _x('Add New', 'Videos taxonomy'),
         'add_new_item' => __('Add New Videos taxonomy'),
         'edit_item' => __('Edit Videos taxonomy'),
         'new_item' => __('New Videos taxonomy'),
         'all_items' => __('All Videos taxonomies'),
         'view_item' => __('View Videos taxonomy'),
         'search_items' => __('Search Videos taxonomies'),
         'not_found' =>  __('No Videos taxonomies found'),
         'not_found_in_trash' => __('No Videos taxonomies found in Trash'), 
         'parent_item_colon' => '',
         'menu_name' => __('Videos Categories')
       );
       register_taxonomy('videos-taxonomies',array('video'), array(
           'hierarchical' => true,
           'labels' => $foodTaxLabels,
           'show_ui' => true,
           'query_var' => true,
           'rewrite' => array('slug' => 'videos'),
       ));
    }
    add_action( 'init', 'codex_custom_init' );
    add_action( 'init', 'create_my_taxonomies' );