Home Forums WoodMart support forum Change permalink of "Projects" i.e. /portfolio/

Change permalink of "Projects" i.e. /portfolio/

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #102621

    mike421
    Participant

    Hi i need to work with project types and i want to change the /portfolio/ permalink i see this forum post from 2016 https://xtemos.com/forums/search/project+permalink/ but quite complex, do you have another solution ? Thanks for answer

    #102690

    Hello,

    Navigate to Dashboard > Pages and find Portfolio page and change the page title.

    Best Regards

    #102709

    mike421
    Participant

    Thanks for fast answer, very useful !
    Also for next people tell to select on right side the portfolio template
    all the best

    #102715

    mike421
    Participant

    Sorry but it’s not working
    Please have a look here https://arg.baliboa.com/prestations/
    Should go to /prestations/name but still go to /portfolio/name

    When i install theme i think i had delete the default portfolio page

    But i test with another website i just begin to work on with your theme same problem
    https://v2.zeenea.com/test-name/ don’t go to /test-name/name

    I update permalinks and change browser same

    Any idea/solution
    Thanks

    #102725

    Artem Temos
    Keymaster

    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;
    }
    #102754

    mike421
    Participant

    Thanks but it’s not working, permalink is ok with /prestations/ but project pages are in 404.

    Did i wrote correctly, please check (once prestations in place of my-slug)

    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’] = ‘prestations’;
    }

    return $args;
    }

    #102798

    Artem Temos
    Keymaster

    After adding the code, try to resave your permalinks via Settings -> Permalinks.

    #102866

    mike421
    Participant

    Yes that’s it !
    Thank you

    #102883

    Artem Temos
    Keymaster

    Great, you are welcome.

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

The topic ‘Change permalink of "Projects" i.e. /portfolio/’ is closed to new replies.