Support

Account

Home Forums General Issues Add page as parent to custom post type (breadcrumbs)

Helping

Add page as parent to custom post type (breadcrumbs)

  • Hi! (dont know if this is the right forum but..)

    I have created a custom post type called ’employees ‘to create single workpepole that are shown listed on a custom template at mysite.com/about/employees.
    But when im going to a single employees post the link changes to :
    mysite.com/employees/person-name
    and i want it to be
    mysite.com/about/employees/person-name

    The Permalink structure looks fine until you get to the single “employee” page.

    any solutions? im trying to get the sites breadcrumbs to work but this issue breaks it.

  • You may be able to achieve what you want with some combination of the ‘has_archive’ and ‘rewrite’ arguments when registering your custom post type. Perhaps something like this:

    
    'has_archive' => 'about/employees',
    'rewrite' => array(
    		'slug' => 'about/employees',
    )
    

    Don’t forget to flush your permalink settings after making this change, and watch out for URL conflicts if you already have a page at /about/employees/.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.