Home › Forums › Themes Support › Claue › Portfolio URLs
- This topic has 3 replies, 2 voices, and was last updated 6 years, 3 months ago by Foster.
Viewing 3 reply threads
-
AuthorPosts
-
-
February 6, 2018 at 8:53 am #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
-
February 7, 2018 at 9:14 pm #16847
Hi,
Please add the code below into functions.php file of child theme
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 -
February 7, 2018 at 9:47 pm #16860
Hi Foster, I am not able to open this pastebin page. Can you please send me another way ? Thank you
-
February 7, 2018 at 9:53 pm #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 );
-
-
AuthorPosts
Viewing 3 reply threads
You must be logged in to reply to this topic.