Home Forums Themes Support Claue Portfolio URLs

Viewing 3 reply threads
  • Author
    Posts
    • #16816

      Hi,

      Where is the portfolio php to change the url links

      http://mydomainn.com/portfolio_cat/events/

      I would like to change this to another word. Thank you

    • #16847

      Hi,

      Please add the code below into functions.php file of child theme

      https://pastebin.com/ALiH9YDG

      Note: Don’t forget to re-save your permalinks after modifying the code as this will flush the rewrite rules which is needed to make the changes.

      Cheers,
      Foster

    • #16860

      Hi Foster, I am not able to open this pastebin page. Can you please send me another way ? Thank you

    • #16862

      Please see

      function claue_change_portfolio_slug() {
          // get the arguments of the already-registered taxonomy
          $portfolio_cat_args = get_taxonomy( 'portfolio_cat' ); // returns an object
       
          // make changes to the args
          // in this example there are three changes
          // again, note that it's an object
          $portfolio_cat_args->show_admin_column = true;
          $portfolio_cat_args->rewrite['slug'] = 'your_new_portfolio_slug_here';
          $portfolio_cat_args->rewrite['with_front'] = false;
       
          // re-register the taxonomy
          register_taxonomy( 'portfolio_cat', 'your_new_portfolio_slug_here', (array) $portfolio_cat_args );
      }
      // hook it up to 11 so that it overrides the original register_taxonomy function
      add_action( 'init', 'claue_change_portfolio_slug', 11 );
Viewing 3 reply threads

You must be logged in to reply to this topic.