• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

CPT's + permalinks

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › CPT's + permalinks

This topic is: not resolved

Tagged: CPT URL, permalinks, rewrite slug

  • This topic has 6 replies, 2 voices, and was last updated 10 years, 1 month ago by design_agency.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • July 12, 2016 at 11:02 am #189317
    design_agency
    Member

    hiya– trying to sort out an issue i've bumped into with my permalinks.

    i have a CPT called 'public-scholars' where i have a catalog of talks and speakers and is located here:
    http://dev3.design-agency.org/our-work/programs/public-scholar-catalog/

    when clicking into a post, the url becomes something like this: http://dev3.design-agency.org/scholar-catalog/food-for-thought/

    where you lose the url breadcrumbs and contextual connection to the rest of the site. is there a way i can add in the 'our-work/programs/' to the url of these specific posts?

    site password is: hope

    many thanks in advance

    http://dev3.design-agency.org/our-work/programs/public-scholar-catalog/
    July 12, 2016 at 11:32 am #189323
    Brad Dalton
    Participant

    You can customize the CPT slug.

    'rewrite'  => array( 'slug' => 'your-slug', 'with_front' => false ),
    

    Executive Pro includes the full CPT code which includes the rewrite arg for register_taxonomy

    rewrite
    (boolean/array) (optional) Set to false to prevent automatic URL rewriting a.k.a. "pretty permalinks". Pass an $args array to override default URL settings for permalinks as outlined below:
    Default: true
    'slug' - Used as pretty permalink text (i.e. /tag/) - defaults to $taxonomy (taxonomy's name slug)
    'with_front' - allowing permalinks to be prepended with front base - defaults to true
    'hierarchical' - true or false allow hierarchical urls (implemented in Version 3.1) - defaults to false
    'ep_mask' - (Required for pretty permalinks) Assign an endpoint mask for this taxonomy - defaults to EP_NONE. If you do not specify the EP_MASK, pretty permalinks will not work. For more info see this Make WordPress Plugins summary of endpoints.
    Note: You may need to flush the rewrite rules after changing this. You can do it manually by going to the Permalink Settings page and re-saving the rules -- you don't need to change them -- or by calling $wp_rewrite->flush_rules(). You should only flush the rules once after the taxonomy has been created, not every time the plugin/theme loads.
    

    Tutorials for StudioPress Themes.

    July 13, 2016 at 9:13 am #189399
    design_agency
    Member

    thanks for sending this along @braddalton

    i imagine this goes into my functions.php file but i think it also needs to be wrapped in a function, yes? at best im a noob with php and what i've tried so far has crashed my local site. any nods in the right direction with how to properly insert this bit of code?

    July 13, 2016 at 12:33 pm #189408
    Brad Dalton
    Participant

    This shows you how to edit the code which creates your CPT. Its as simple as that. If you're using a plugin to generate the CPT then you need to contact the plugin Dev. Otherwise, you can create the CPT using code from the Executive Pro themes functions file and change all instances of portfolio to the name of your CPT. Thats how i would do it.


    Tutorials for StudioPress Themes.

    July 14, 2016 at 1:53 pm #189491
    design_agency
    Member

    i did some more reading and that makes perfect sense, thanks for the follow up.

    i did use wp-types to create the CPT and figured out how to get the urls to display correctly, but those url's aren't being reflected in the breadcrumbs. i reached out to the wp-types support team and they say it's a genesis problem: "As I can see "Breadcrumbs" set using genesis theme settings and may require studying what code genesis used to display breadcrumbs and unfortunately that is totally beyond the scope of our support policy."

    so, im in a bit of a pickle in that the slugs are displaying correctly, but the breadcrumbs aren't.

    any advice on what to do next?

    July 14, 2016 at 2:12 pm #189493
    Brad Dalton
    Participant

    You can filter the genesis breadcrumbs.


    Tutorials for StudioPress Themes.

    July 14, 2016 at 3:44 pm #189503
    design_agency
    Member

    amazing. thank you!

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble