Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created February 13, 2017 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalchild/118674f3792a4d1d9ce1651e0d90844b to your computer and use it in GitHub Desktop.
Save digitalchild/118674f3792a4d1d9ce1651e0d90844b to your computer and use it in GitHub Desktop.
Change product archive <title> on Vendor shop
<?php
add_filter( 'pre_get_document_title', 'vendor_page_title', 999, 1 );
function vendor_page_title( $title ) {
if ( WCV_Vendors::is_vendor_page() || $vendor_page ) {
return sprintf( '%s - %s', __( 'Products', 'wc-vendors'), WCV_Vendor_Shop::page_title() );
} else {
return $title;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment