Free and Premium WordPress Plugins & Themes Forums WordPress Themes Alpenhouse Delete title category portfolio and change slug portfolio-cateigory
- This topic has 1 reply, 2 voices, and was last updated 2 years, 6 months ago by J. Davis.
- AuthorPosts
- June 6, 2022 at 5:56 pm #1314163Leonardo GrabowParticipant
Good morning
How are you? I hope you are very well.
I’m using the Alpenhouse template and I’m noticing that in Portfolio, I can’t delete the title “Category:” and it’s a problem because we need it not to appear.Please, can you help me?
https://prnt.sc/XGK1jQ-rTMyUOn the other hand, the SLUG of portfolio-category, I need to change it to “category-gallery” or similar, where can I make the change?
I am using the Hotel Booking plugin and the Alpenhouse template.
Thank you very much
Sincerely
Leonardo GrabowJune 9, 2022 at 10:33 pm #1315817J. DavisKeymasterHi,
Thanks for your further question. You may use the code below to remove the archive labels:
add_filter( 'get_the_archive_title', 'custom_alpenhouse_archive_title' ); function custom_alpenhouse_archive_title( $title ) { if ( is_tax() ) { $title = single_term_title( '', false ); } return $title; }
The code can be added to functions.php file of the theme.
As for the portfolio category slug so you may use the code below:function theme_edit_slug_alpenhouse_portfolio_category( $args, $taxonomy ) { if ( 'cptp-portfolio-category' === $taxonomy ) { $args['rewrite']['slug'] = 'portfolio-category'; } return $args; } add_filter( 'register_taxonomy_args', 'theme_edit_slug_alpenhouse_portfolio_category', 20, 2 );
You need to add the code to the functions.php file of the theme and replace
portfolio-category
in the code. Then navigate to Settings > Permalinks and save the changes.best regards,
J. Davis - AuthorPosts
- You must be logged in to reply to this topic.