Change the portfolio url

This topic is: not resolved

Tagged: ,

This topic contains 7 replies, has 3 voices, and was last updated by Raghavendra Raghavendra 5 years, 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5643
    Permagnus
    permagnus
    Member
    Post count: 3

    Hi,

    On my site the urls are like http://www.mysite.com/portfolio/ and http://www.mysite.com/portfolio/some-item

    The I have another page setup at http://www.mysite.com/cases/. Can I change thee url of the portfolio items to http://www.mysite.com/cases/some-item ?

    #5689
    Raghavendra
    Raghavendra
    Moderator
    Post count: 4682

    No problem. You can change them to any URL. The URL has nothing to do with the portfolio items.

    #5691
    Permagnus
    permagnus
    Member
    Post count: 3

    How do I change the url?

    #5704
    Nexus
    Nexus
    Moderator
    Post count: 1022

    You will have to edit the file (theme folder) / framework /presentation / custom-post-types.php line number 203, please modify the rewrite attribute from “portfolio” to “cases”. Hope that helps!

    #5750
    Permagnus
    permagnus
    Member
    Post count: 3

    This works great but I have a custom page at /cases and this is now overriden with the default portfolio page. Can I somehow disable the default portfolio page?

    #5785
    Raghavendra
    Raghavendra
    Moderator
    Post count: 4682

    We are may be trying too much into this question. Probably you do not need to change the rewrite value then. All you need is to edit the page permalinks as described below –

    http://digwp.com/2010/07/optimizing-wordpress-permalinks/

    Pls see the section titled – “Post/page-specific permalink structures (slugs!)”. Pls let us know if we are missing something here. Thanks!

    #5792
    Permagnus
    permagnus
    Member
    Post count: 3

    This did not really help me.

    I have a custom page located at /cases

    I have the portfolio items at /portfolio/some-item

    I want to have the portfolio item /cases/some-time and still keep the custom page at /cases

    If I try Nexus solution I have the right structure but there seems to be a “generic” page the takes over instead of my custom page at /cases.

    Can I disable the generic page at /cases when I move the portfolio items to /cases/some-item?

    #5809
    Raghavendra
    Raghavendra
    Moderator
    Post count: 4682

    Pls change the line number 198 of the framework/presentation/custom-post-types.php from

    'has_archive' => true,
    

    to

    'has_archive' => false,
    

    and see if the generic page goes away. Once you set the value to false, that generic archive page will not be available to you. You can still have cases as permalink and individual portfolio items should not get affected.

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

You must be logged in to reply to this topic.