Support » Plugin: WooCommerce » How to improve the code

  • Want to increase the letters in the commodity title,How to improve the code ?

    Help me ,plz

    Now Title:

    Shop Title | Index
    Products | Index

    Want Title:

    Shop Title | Index
    Products | IndexABCD

    Now the code:

    add_filter(‘post_type_archive_title’, ‘theme_wc_shop_browser_title’ );
    function theme_wc_shop_browser_title( $title ){
    if( $title == __(‘Products’, ‘woocommerce’)){
    $shop_page_id = woocommerce_get_page_id( ‘shop’ );
    $page_title = get_the_title( $shop_page_id );
    return $page_title;
    }
    return $title;
    }

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘How to improve the code’ is closed to new replies.