Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1134260
Changing 'Portfolios' URL name
Closed

Comments

  •  1
    bencrossley started the conversation

    Hi,

    Just wondering what the best way is to change the default 'portfolios' URL title?

    In other words, I would like the url for 'website.com/portfolios/portfolio-item' to be displayed as 'website.com/portfolio/portfolio-item' (without the 's' at the end of 'portfolios').

    Is this easy to change?

    Thanks,

    Ben

  •  7,092
    Oliver replied

    HI!

    In the functions php of the child theme add next code:

    function thegem_portfolio_post_type_change() {
        $args = get_post_type_object("thegem_pf_item");
        $args->rewrite["slug"] = "work";
        register_post_type($args->name, $args);
    }
    add_action('init', 'thegem_portfolio_post_type_change', 10); 

    After that, switch to another theme in theme options and re-activate TheGem again. Then, disable TheGem Elements plugin and re-enable it


    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  1
    bencrossley replied

    Thanks very much!

    Just for your information, I noticed a typo in the 'Portfolio Settings' window (attached).

  •  7,092
    Oliver replied

    HI!

    Thank you, will be fixed in the next plugin update.

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    TOM replied

    hi, ive been trying to do this same thing now and getting a 404 page not found.  copy and pasted exact code and followed deactivating/reactivating instructions.

  •  7,092
    Oliver replied

    HI!

    Pls. provide the wp-admin and ftp access in the new ticket, we'll check. 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • zournas replied

    I have the same problem. I made the changes to the code and followed the instructions. (http://digital.gr)

    Now when I click on the "phaze clinical" item at http://digital.gr/portfolio/phaze-clinical/ I get a 404. Internally it says http://digital.gr/portfolios/phaze-clinical/ 

    But my other project has http://digital.gr/portfolio/mamma-mia/ internally but also gets a 404 error.

  •  7,092
    Oliver replied

    HI!

    Pls. provide the wp-admin and ftp access in the new ticket, we'll check. 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver