daily pastebin goal
67%
SHARE
TWEET

WooCommerce - Change Shop page title

lorro Jun 11th, 2015 (edited) 529 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // Change Shop page title
  3.   // code goes in functions.php for your child theme
  4.   // used for themes that use a product title for the shop page title
  5.   add_filter('post_type_archive_title', 'shop_page_title' );
  6.   function shop_page_title( $title ) {
  7.     if( $title == __('Products', 'woocommerce')) {
  8.       $shop_page_id = woocommerce_get_page_id( 'shop' );
  9.       $page_title = get_the_title( $shop_page_id );
  10.       return $page_title;
  11.     }
  12.     return $title;
  13.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top