• I created a custom type post COMPANY
    and created a custom taxonomy LOCATION

    this custom post type:

    $labels = array(
            'name' => 'Company',
            'singular_name' => 'Company',
        );
        $args = array(
            'labels' => $labels,
            'public' => true,
            'publicly_queryable' => true,
            'show_ui' => true,
            '_builtin' => false,
            'query_var' => true,
            'rewrite' => array( 'slug' => '/%location%','with_front' => false ),
            'capability_type' => 'post',
            'hierarchical' => false,
            'menu_position' => 5,
            'taxonomy' => array('cat','location'),
            'permalink' => EP_CATEGORIES,
            'supports' => array('title','thumbnail','editor'/*,'excerpt'/*,'custom-fields'*/)
        );
    
        register_post_type('company',$args);

    this custom taxonomy:

    register_taxonomy(
            'location',
            array( 'company' ),
            array(
                'public' => true,
                'hierarchical' => true,
                'labels' => array( 'name' => 'Location', 'singular_name' => 'Location' ),
                'show_ui' => true,
                'query_var' => 'location',
                'rewrite' => array( 'slug' => 'location' )
            )
        );

    in SETTING -> PERMALINK
    I used the shape of the permalink: /%company%.html
    work and you see the page
    but when I try to introduce the taxonomy does not work
    I tested: /%location%/%company%.html
    but the address I get this: mysite.com/%location%/name-company.html
    where is the problem?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Custom Post Permalinks] Custom post type and custom taxonomy’ is closed to new replies.