Site logo

Archived topic

GP Premium WC CSS hides Post feature image

3 replies · Started by Patrick on October 12, 2022

Viewing posts 1–4 of 4

Dear Support,

I realized that on my single-post pages that the feature image is hidden via GP Premium CSS ?

/wp-content/plugins/gp-premium/woocommerce/functions/css/woocommerce.min.css?ver=2.1.2

.woocommerce .page-header-image-single {
    display: none;
}

It seems you add this css in wp-content/themes/generatepress/inc/plugin-compat.php:118

	function generate_woocommerce_css() {
		if ( ! class_exists( 'WooCommerce' ) ) {
			return;
		}

		$mobile = generate_get_media_query( 'mobile' );

		$css = '.woocommerce .page-header-image-single {
			display: none;
		}

Any ideas?

Thanks,
Patrick

Hi there,

is it possible to the single post ? As that CSS uses the woocommerce body class which shouldn't be present on a single post.

Hi David,

Thanks for your fast reply.

I was confused about that too, but it seems WC puts it's woocommerce class in the body tag?


<body class="post-template-default single single-post postid-258269 single-format-standard logged-in admin-bar wp-custom-logo wp-embed-responsive theme-generatepress post-image-above-header post-image-aligned-center sticky-menu-fade woocommerce-js right-sidebar nav-float-right separate-containers header-aligned-left dropdown-hover featured-image-active dokan-theme-generatepress customize-support <strong>woocommerce</strong>" itemtype="https://schema.org/Blog" itemscope="">

Had no idea where it is coming from, and we haven't used the blog and posts functionality so far, so don't know when this class was added there.

I justed setup a local dev env and updated the WC Plugin to the previous latest Version (from 6.5.1 to 6.9.4), it seems the class is not part of the body tag there, so was fixed in an update.

Sorry to bother you with that, seems like a WC issue. But perhaps it's helpful for others running WC 6.5.1.

Thanks,
Patrick

Glad to hear thats it working, and thanks for reporting it. I am sure others will find it helpful

This archived topic is closed to new replies.