WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Title displaying "Product Categories" and "Product Tags" (3 posts)

  1. dizda
    Member
    Posted 8 months ago #

    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/

  2. zajohnson
    Member
    Posted 8 months ago #

    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>

  3. dizda
    Member
    Posted 8 months ago #

    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'; }

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.