WordPress.org

Support

Support » Plugins and Hacks » Title displaying "Product Categories" and "Product Tags"

Title displaying "Product Categories" and "Product Tags"

  • I just noticed that my customized titles display “Product Categories” or “Product Tags” in front of it.

    For example: I have a jeans category which title used to be “Jeans online”.

    Like this:
    if (is_product_category()) { wp_title(''); echo ' online'; }

    But now it displays like: “Product Categories Jeans online”.

    Same goes for tags.

    How can I remove this from the title?

    http://wordpress.org/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just noticed the same issue.

    Here is a fix I came up with. Had to do a string replace.

    <title><?php echo str_replace('Product Categories |', '', wp_title('|', false, 'right')); ?><?php bloginfo('name'); ?></title>

    Thank you, that does look like a good fix. However, for some reason it doesn’t work with my code:

    if (is_product_category()) { echo str_replace('Product Categories ', '', wp_title('')); echo ' online'; }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Title displaying "Product Categories" and "Product Tags"’ is closed to new replies.