Support » Themes and Templates » Custom Post Type

  • Resolved Jeff Clark

    (@jclark32)


    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?

Viewing 1 replies (of 1 total)
  • Thread Starter Jeff Clark

    (@jclark32)

    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,
    array(
    ‘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’,
    )
    );

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Type’ is closed to new replies.