#42631 Changing “portfolio” slug for Portfolio post type in Jupiter X
Landing › Forums › JupiterX WordPress Theme › Changing “portfolio” slug for Portfolio post type in Jupiter X
-
AuthorPosts
-
Jens Bayer 2 years, 4 months ago
Hello support team,
we are currenty using your post type ‘portfolio’ to display our products on our website https://massstabfabrik.medienvirus.com/. Now we want to change the default ‘portfolio’ slug and replace it with the product-category. The breadcrumps are visible on the product page.
Currently it is displayed as following: Home>Portfolios>Zollstock Modell Bauer 400
But we want to display it like this: Home>Zollstöcke>Zollstock Modell Bauer 400
How do we fix this?
Thank you and kind regards
Jens
Tatyana Hutsol Support Team 2 years, 4 months agoHello,
You can change the Portfolio slug using a custom code in the functions.php file:
add_filter( 'register_post_type_args', 'wpse247328_register_post_type_args', 10, 2 ); function wpse247328_register_post_type_args( $args, $post_type ) { if ( 'portfolio' === $post_type ) { $args['rewrite']['slug'] = 'your_custom_slug'; $args['labels']['name'] = 'Your_custom_slug'; } return $args; }
Then re-save permalinks in Settings > Permalinks.
If you want to show the category name in the breadcrumbs path, I recommend you to use Yoast SEO plugin and enable Breadcrumbs there https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/ (read the part “How do I Enable and Set-up the Yoast BreadCrumbs?”).
Thank you.
Thank you.
Clare McDonald 2 years, 4 months agoCan I just add to this question and ask how you can it when you want to show different portfolio categories in the slug?
Jens Bayer 2 years, 4 months agoHi,
i think you get us wrong. We want to have the categories as part of the permalink instead of just the posttype-name “portfolio”.
For example:
https://massstabfabrik.medienvirus.com/portfolio/zollstock-modell-bauer-200/
Should be (automatically!)
https://massstabfabrik.medienvirus.com/zollstoecke/zollstock-modell-bauer-200/
We have all those categories already build inside the posttype “portfolios” – see attached screenshot
Cheers
Jens
Alexander Hutsol Support Team 2 years, 3 months agoHello,
Sorry for misunderstanding.
In this case you need install the Yoast SEO plugin and enable Breadcrumbs option there https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/ (read the part “How do I Enable and Set-up the Yoast BreadCrumbs?”).
There is a setting that allows to show categories in the breadcrumbs.
Regards.
-
AuthorPosts