Home › Forums › Basel support forum › Translate portfolio slug
Translate portfolio slug
- This topic has 5 replies, 2 voices, and was last updated 7 years, 5 months ago by Artem Temos.
-
AuthorPosts
-
July 18, 2017 at 11:06 am #16556
nuovomediaParticipantHello,
I bought the Basel-theme and I am very enthouiast about it! Great theme!
For a cliënt of mine I am creating a website with Basel theme. The website is multi lingual, with four languages. I use the portfolio for displaying there products. But when I visit a product, the URL will display /portfolio/product-name. I want to change /portfolio/ into /varieties/. This slug have to be translatable in the four languages.
Is this possible? What is the best way to get this result?
Thanks in forward!
Marco
July 18, 2017 at 12:04 pm #16562
Artem TemosKeymasterHello,
Thank you so much purchasing our theme and contacting our support center.
What plugin do you use to translate your website to four languages? In case you are using WPML, here is an article from their documentation that may help you https://wpml.org/documentation/getting-started-guide/translating-page-slugs/
Kind Regards
XTemos StudioJuly 21, 2017 at 10:12 am #16683
nuovomediaParticipantThanks for your quick reply. I managed to translate this slug. Now I found another slug. I can’t find a way to translate this one.
If I add an Project categorie to the main navigation, the link goes to: “www.sitename.url/project-cat/baguette”. I want to replace “/project-cat/” for “/product/”.
I can translate the taxonomy with WPML, but the slug stays “/project-cat/”. Where can I translate this slug?
Greets, Marco
July 21, 2017 at 11:51 am #16685
Artem TemosKeymasterHello,
You can change rewrite base for the portfolio categories in the file
wp-content/plugins/basel-post-types/basel-post-types.php
. Find this code$labels = array( 'name' => _x( 'Project Categories', 'Taxonomy plural name', $this->domain ), 'singular_name' => _x( 'Project Category', 'Taxonomy singular name', $this->domain ), 'search_items' => __( 'Search Categories', $this->domain ), 'popular_items' => __( 'Popular Project Categories', $this->domain ), 'all_items' => __( 'All Project Categories', $this->domain ), 'parent_item' => __( 'Parent Category', $this->domain ), 'parent_item_colon' => __( 'Parent Category', $this->domain ), 'edit_item' => __( 'Edit Category', $this->domain ), 'update_item' => __( 'Update Category', $this->domain ), 'add_new_item' => __( 'Add New Category', $this->domain ), 'new_item_name' => __( 'New Category', $this->domain ), 'add_or_remove_items' => __( 'Add or remove Categories', $this->domain ), 'choose_from_most_used' => __( 'Choose from most used text-domain', $this->domain ), 'menu_name' => __( 'Category', $this->domain ), ); $args = array( 'labels' => $labels, 'public' => true, 'show_in_nav_menus' => true, 'show_admin_column' => false, 'hierarchical' => true, 'show_tagcloud' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'query_var' => true, 'capabilities' => array(), );
and replace with this one
$labels = array( 'name' => _x( 'Project Categories', 'Taxonomy plural name', $this->domain ), 'singular_name' => _x( 'Project Category', 'Taxonomy singular name', $this->domain ), 'search_items' => __( 'Search Categories', $this->domain ), 'popular_items' => __( 'Popular Project Categories', $this->domain ), 'all_items' => __( 'All Project Categories', $this->domain ), 'parent_item' => __( 'Parent Category', $this->domain ), 'parent_item_colon' => __( 'Parent Category', $this->domain ), 'edit_item' => __( 'Edit Category', $this->domain ), 'update_item' => __( 'Update Category', $this->domain ), 'add_new_item' => __( 'Add New Category', $this->domain ), 'new_item_name' => __( 'New Category', $this->domain ), 'add_or_remove_items' => __( 'Add or remove Categories', $this->domain ), 'choose_from_most_used' => __( 'Choose from most used text-domain', $this->domain ), 'menu_name' => __( 'Category', $this->domain ), ); $args = array( 'labels' => $labels, 'public' => true, 'show_in_nav_menus' => true, 'show_admin_column' => false, 'hierarchical' => true, 'show_tagcloud' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'query_var' => true, 'capabilities' => array(), 'rewrite' => array( 'slug' => 'your-slug' ), );
Kind Regards
XTemos StudioJuly 26, 2017 at 12:52 pm #16833
nuovomediaParticipantHello, thanks for the solution. I have tried this and it works. But now I have two questions:
1. How can I translate this with WPML? In French or German, the slug needs to be the French/German word for product: Produkt / Produit.
2. When you guys place an update for the theme/plug-in. It could overwrite this solution. There isn’t a way to accomplish this in the child-theme?
Thanks in forward!
Greets, Marco
July 26, 2017 at 1:43 pm #16837
Artem TemosKeymasterHi,
1. This question is more related to the plugin. You may need to contact plugin’s developers for help in this question.
2. Sorry, but it is not possible to change this function in the child theme at the moment.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register