WordPress.org

Forums

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

  1. janfeng
    Member
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic