Tagged: portfolio entry
-
AuthorPosts
-
November 18, 2015 at 9:36 pm #538559
Hi There! Is there a simple way to remove the terms “portfolio item” and “porfolio entrie” at the URL?
Example:
http://dambroz.com.br/portfolio-item/grandversatille/
to
http://dambroz.com.br/grandversatille/http://dambroz.com.br/portfolio_entries/bomba/
to
http://dambroz.com.br/bomba/Thank you!
November 18, 2015 at 11:25 pm #538603Hi educode!
Please do go to your Permalink settings ( Settings -> Permalinks ) and you will be able to change those!
Let us now if that fit your needs.Cheers!
BasilisNovember 19, 2015 at 1:40 pm #538944Hello Basilis, I have tried this before but no one of the options does what I asked, could you tell me what I need to do exactly?
thank you!
November 23, 2015 at 8:42 am #540560Hi!
Please add this in the functions.php file:
add_filter('avf_portfolio_cpt_args', 'avf_portfolio_cpt_args_mod'); function avf_portfolio_cpt_args_mod($args) { $args['rewrite']['slug'] = 'portfolio'; //$args['rewrite']['with_front'] = false; return $args; } add_filter( 'post_type_link', 'ava_remove_custom_slug', 10, 3 ); function ava_remove_custom_slug( $post_link, $post, $leavename ) { if ( 'portfolio' != $post->post_type || 'publish' != $post->post_status ) { return $post_link; } $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); return $post_link; }
After that, go to the Settings > Permalinks panel then click “Save” to update the permalinks.
Regards,
IsmaelOctober 25, 2016 at 6:40 pm #703916Hi!
I used this code, because I have the same issue that Basilis. But all my links are broken now. 404.
When you see the link structure, that´s ok – http://www.site.com/with-out-portfolio-item – but doesn´t show the page. Erro 404
Can you help me?
- This reply was modified 8 years, 1 month ago by Flávio Pavanelli. Reason: show the link
October 25, 2016 at 8:21 pm #703948Hey!
WHen you use the code, please also re-flush by going to Dashboard -> Settings -> Permalinks and press ave to custom.
Thanks a lot
Regards,
BasilisOctober 25, 2016 at 9:01 pm #703967Doesn´t Work. But that´s ok! I figured out the other way to solve this issue. Tks Basilis!
-
AuthorPosts
- The topic ‘Cleaning Permalink’ is closed to new replies.