How to translate all – portfolio category slug, directly in theme code
-
Hi, how can i translate/change portfolio slug (all) for all categories directly in theme code?
What css file and what part of code to add/change?
Thanks
Attachments:
You must be
logged in to view attached files.
Hello,
You need to rename the Portfolio page. Navigate to Dashboard > Pages > find the page which is assigned as the portfolio page and change the title.
Best Regards
Please read the question before answering it. I want to change the “all” category, see the attached printscreen!
Hello,
There is no option to change this. You can hide with custom CSS.
Best Regards
If there is code dor basel to change this, tnen it shoud be for woodmart. It goes somethong with adding ‘rewrite’ slug your_slig… to theme post file…
Send me css for hiding it.
Hello,
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;
}
Best Regards
Hello, the code doesnt work and that isnt the thing I want to change… Please see the attached photo! We want to change the name for “all” category in portfolio…
Attachments:
You must be
logged in to view attached files.
You can translate or just change all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3
We suggest you to keep translated files in wp-content/languages/themes/woodmart-pt_PT.po folder.
I know i can… I dont want to use loco translate becouse i use another translation plugin, and they cant function together. I want to change slug “all” inside the theme!
Please send me the part of a code i need to change. Thank you!!!
In this case, you can customize the file inc/shortcodes/portfolio.php
Omg, and you call this customer support? Send me the code i need to change in that file!
The topic ‘How to translate all – portfolio category slug, directly in theme code’ is closed to new replies.