Delete title category portfolio and change slug portfolio-cateigory

Free and Premium WordPress Plugins & Themes Forums WordPress Themes Alpenhouse Delete title category portfolio and change slug portfolio-cateigory

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1314163
    Leonardo Grabow
    Participant

    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-rTMyU

    On 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 Grabow

    #1315817
    J. Davis
    Keymaster

    Hi,

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.