Home Forums WoodMart support forum How to translate all – portfolio category slug, directly in theme code

How to translate all – portfolio category slug, directly in theme code

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #133931

    Digital PR
    Participant

    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.
    #133946

    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

    #133950

    Digital PR
    Participant

    Please read the question before answering it. I want to change the “all” category, see the attached printscreen!

    #133984

    Hello,

    There is no option to change this. You can hide with custom CSS.

    Best Regards

    #133996

    Digital PR
    Participant

    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.

    #134008

    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

    #134017

    Digital PR
    Participant

    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.
    #134055

    Artem Temos
    Keymaster

    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.

    #134059

    Digital PR
    Participant

    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!!!

    #134068

    Artem Temos
    Keymaster

    In this case, you can customize the file inc/shortcodes/portfolio.php

    #134122

    Digital PR
    Participant

    Omg, and you call this customer support? Send me the code i need to change in that file!

    #134135

    Artem Temos
    Keymaster

    You just need to find the word All and change it https://gyazo.com/c6f60fcbceac88c16cdffb370975704f

    #134171

    Digital PR
    Participant

    Ok, thank you!

    #134185

    Artem Temos
    Keymaster

    You are welcome.

Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘How to translate all – portfolio category slug, directly in theme code’ is closed to new replies.