Home / Forums / WoodMart support forum / Change Portfolio SLUG / New Custom Post Type
Home › Forums › WoodMart support forum › Change Portfolio SLUG / New Custom Post Type
Change Portfolio SLUG / New Custom Post Type
- This topic has 7 replies, 3 voices, and was last updated 7 years, 1 month ago by
Artem Temos.
-
AuthorPosts
-
October 18, 2018 at 6:29 pm #83703
luciushudsonParticipantHi,
Is it possible to change the Portfolio SLUG to (for example): ‘Clients’?
Or do I need to create a new Custom Post Type?If so, which plugin do you recommend concerning compatibility issues?
Custom Post Type UI or Toolset Types ??NOTE: I’m using WPML for making my WordPress/Woocommerce multi-language.
THANKS!
October 19, 2018 at 6:18 am #83738
Elise NoromitMemberHello,
You can change the slug and title of the Portfolio page in the admin area: Dashboard -> Pages -> edit portfolio page
Best Regards
October 29, 2018 at 7:12 pm #85979
luciushudsonParticipantWhat I mean, Elise, is:
This is the URL where I want to use the Portfolio Items (archive view):
http://ec2-34-217-106-21.us-west-2.compute.amazonaws.com/clients/This is a Single/Singular Portfolio Item (so far I’m using demo content):
http://ec2-34-217-106-21.us-west-2.compute.amazonaws.com/portfolio/suspendisse-quam-at-vestibulum/On the LAST URL, where it says PORTFOLIO, I would like my URL to say CLIENTS
So my question (again) is:
Is it possible to change the Portfolio SLUG to (for example): ‘Clients’?
Or do I need to create a new Custom Post Type?October 29, 2018 at 7:46 pm #85986
Artem TemosKeymasterHi,
Try to edit the file
wp-content/plugins/woodmart-core/post-types.phpand change the line'rewrite' => array('slug' => 'portfolio'),to this
'rewrite' => array('slug' => 'clients'),And then go to Settings -> Permalinks and resave them.
Regards
October 31, 2018 at 6:33 pm #86332
luciushudsonParticipantIt looks like a solution, though not much of a friendly one.
Iswp-content/plugins/woodmart-core/post-types.phpa file that can be overwriten in the woodmart-child Child Theme folder??
TKS!October 31, 2018 at 7:42 pm #86358
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to do this
add_filter('register_post_type_args', 'portfolio_to_my_slug', 10, 2); function portfolio_to_my_slug($args, $post_type){ if ($post_type == 'portfolio'){ $args['rewrite']['slug'] = 'my_slug'; } return $args; }October 31, 2018 at 8:31 pm #86384
luciushudsonParticipantRe-saved permalinks and worked as a charm!
THANK YOU VERY MUCHOctober 31, 2018 at 8:46 pm #86388
Artem TemosKeymasterGreat, you are welcome.
-
AuthorPosts
Tagged: custom post type, Custom Slug
- You must be logged in to create new topics. Login / Register