Remove a sub heading text under products page title in OceanWP theme

Viewed 2925

I am trying to figure out how to change/remove the text under "Products (Varer)" on my Wordpress woocommerce website like in this screenshot:

See this picture for reference.

Any help is appreciated.

2 Answers

According to OceanWP's docs, you can add this function to your functions.php file of the child theme to remove the subheading:

// Remove the Shop page subheading
function my_remove_shop_page_header_subheading( $subheading ) {

    if ( is_shop() ) {
        $subheading = false;
    }

    // Return the subheading
    return $subheading;

}
add_filter( 'ocean_post_subheading', 'my_remove_shop_page_header_subheading' );

Alternatively, you can add one line of extra css to your website (tested and worked):

.clr .page-subheading {display: none}

Follow this steps to edit/remove sub heading.

  1. Go to Pages > select shop page > Edit.

  2. Under Ocean WP settings choose Title.

  3. Enter your desired subheading or a single space in case you want to remove that altogether.

Note: A single space would remove that line altogether, won't create an empty line as of now.

I am not sure if that would change with theme/plugin updates, but is a good option if you have not created child theme. In case you have created a child theme have a look here: https://docs.oceanwp.org/article/500-remove-the-shop-page-subheading

Related