[resolved] Custom Post Type (2 posts)

  1. Jeff Clark
    Posted 2 years ago #

    I am working if there is a way to assign Custom Post Type to Parent outside of the CPT. The answer is yes you can. Now my issue is during the register post type function if I use the slug rewrite it places the slug -> parent -> post/page. I need to have the parent page come before the slug because that logical order. I believe it should be parent->slug->post/page.

    If I dont use the rewrite it works fine and gives me http://www.myurl.com/?location=city and my breadcrumbs work as well.

    I am looking to use a pretty permalink structure for this if possible.

    Any thoughts?

  2. Jeff Clark
    Posted 2 years ago #

    Solved my own problem.

    After using http://janina.tumblr.com/post/3588081423/post-parent-different-type
    the script above will need a few mods to make it work but it works PERFECT now!!!

    If you see below the has_archive has to be set to true

    register_post_type( $this->jdevPostKey,
    'labels' => array(
    'name' => __( $this->jdevPostName ),
    'singular_name' => __( $this->jdevPostSingleName ),


    'public' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'has_archive' => true,
    'hierarchical' => false,
    'rewrite' => true,
    'supports' => $this->jdevSupports,
    'menu_icon' => $this->jdevPostIconStr,
    'capability_type' => 'page',

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.