WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
How to improve the code (1 post)

  1. janfeng
    Member
    Posted 3 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic