Portfolio custom post type slug - by babelpr

This topic has 12 replies, 3 voices, and was last updated 8 years, 6 months ago ago by Jack Richardson

  • Avatar: babelpr
    babelpr
    Participant
    June 27, 2016 at 11:52

    Hi,

    Within your theme there is a custom post type for Portfolio.

    I’m looking to change domain.com/portfolio/[post-url] to domain.com/case-study/[post-url]

    Can you advise where the code is for that post type slug is so I can change it?

    Thanks

    11 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 27, 2016 at 15:17

    Hello,

    In that case you need to edit the wp-content/themes/royal/framework/portfolio.php file and change the following code line:
    'rewrite' => array('slug' => 'portfolio')
    to
    'rewrite' => array('slug' => 'case-study')

    After you need to resave permalinks in WP Dashboard > Settings > Permalinks.

    Best regards,
    Jack Richardson.

    Avatar: babelpr
    babelpr
    Participant
    June 27, 2016 at 16:58

    Hi Jack,

    I’ve changed the code as per your instructions and it’s changed the slug to “etheme_portfolio” instead of “case-study”

    This is the URL now:
    http://newbrand.babelpr.com/etheme_portfolio/eye-fi/

    Here’s the change made:
    http://take.ms/zarZs

    Please advise?

    Thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 27, 2016 at 17:07

    Hello,

    Please provide us with WP Dashboard and FTP credentials in private content.

    Best regards,
    Jack Richardson.

    Avatar: babelpr
    babelpr
    Participant
    June 28, 2016 at 10:39

    Sure. Access via private content below.

    Thanks

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 28, 2016 at 10:53

    Hello,

    The problem was you added wrong quotes. I’ve edited the file.
    Please check the page now http://newbrand.babelpr.com/case-study/just10/ .

    Best regards,
    Jack Richardson.

    Avatar: babelpr
    babelpr
    Participant
    June 28, 2016 at 11:12

    Hi Jack,

    Many thanks. The URL looks perfect.

    Is it also possible to change the section breadcrumbs from “project” to “Case Study” as well?

    http://take.ms/uZqfZ

    I’ve also noticed a bug where the breadcrumb link goes back to the page and has “//” at the end of the URL. Can this be edited to link to the section home: /our-work?

    Thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 28, 2016 at 11:56

    Hello,

    I’ve changed “Projects” text in breadcrumbs in the file wp-content/themes/royal/framework/portfolio.php in line 14. Please check.
    To get the link work you need create Portfolio page using our template “Portfolio” http://prntscr.com/bm2uvg .

    Best regards,
    Jack Richardson.

    Avatar: babelpr
    babelpr
    Participant
    June 28, 2016 at 12:30

    Hi Jack,

    Links are fine except for the extra trailing slash on the breadcrumb link: http://take.ms/N3tA0

    Also it doesn’t look like the breadcrumb text in case study section has changed, still says “/ Projects /”.

    Thanks

    Avatar: Eva
    Eva Kemp
    Support staff
    June 28, 2016 at 14:51

    Hello,

    I’ve removed extra slash in line 3189 in the file wp-content/themes/royal/framework/theme-functions.php.
    Please check the page now.

    Regards,
    Eva Kemp.

    Avatar: babelpr
    babelpr
    Participant
    June 28, 2016 at 16:40

    Great! Many thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 29, 2016 at 07:40

    Hello,

    You’re welcome.

    Best regards,
    Jack Richardson.

  • Viewing 12 results - 1 through 12 (of 12 total)

The issue related to '‘Portfolio custom post type slug’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.