Change Portfolio SLUG / New Custom Post Type
-
Hi,
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!
Hello,
You can change the slug and title of the Portfolio page in the admin area: Dashboard -> Pages -> edit portfolio page
Best Regards
What 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?
Hi,
Try to edit the file wp-content/plugins/woodmart-core/post-types.php
and change the line
'rewrite' => array('slug' => 'portfolio'),
to this
'rewrite' => array('slug' => 'clients'),
And then go to Settings -> Permalinks and resave them.
Regards
It looks like a solution, though not much of a friendly one.
Is wp-content/plugins/woodmart-core/post-types.php
a file that can be overwriten in the woodmart-child Child Theme folder??
TKS!
Try 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;
}
Re-saved permalinks and worked as a charm!
THANK YOU VERY MUCH