Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created February 6, 2012 12:15
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 mikejolley/1751818 to your computer and use it in GitHub Desktop.
Save mikejolley/1751818 to your computer and use it in GitHub Desktop.
WooCommerce - WooSEO for the shop page/custom post type archive
add_filter('woo_title', 'woocommerce_shop_page_title');
function woocommerce_shop_page_title( $title ) {
if ( is_post_type_archive('product') ) {
$title = get_post_meta(woocommerce_get_page_id('shop'), 'seo_title', true);
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment