Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #331520

    Hello,

    I am trying to place a full width image on our various product category pages. However, every image I try to place is limited the right side of the screen. I really want the image to be full width just below the header, like with the full width slider. How do I go about doing this?

    Thank you,
    Wendy

    #332090

    Hey johniem!

    Thank you for using Enfold.

    You’re using a small category image. Width of the image should be at least 900px.

    Regards,
    Ismael

    #332218

    Hi Ismael,

    Thank you. But if I use a big category image, will the images on the category overview page be that wide as well? Ideally I want to have small thumbnails on the category overview page and a big widescreen image just below the header on each of the various category pages. Is this possible?

    Edit: if I change the image width to full width, it still does not change position. I’d like it to be below the header and stretching from one end of the screen to the other, like this: http://www.bikecap.com/nl/pillow.html So the image is above the main content and sidebar. Is this possible?

    • This reply was modified 10 years, 1 month ago by johniem.
    #333746

    I’d really appreciate a reply to my question: this part of the design is really taking up a lot of time and I’d like to know if it’s at all possible to have a big image on the product category page like this: http://www.bikecap.com/nl/pillow.html

    Thanks,
    Wendy

    #334222

    Hi!

    If you want to change the layout of the category page featured image, you can edit config-woocommerce > config.php. Find this code on line 718:

    if(is_product_category())
    	{
    		global $wp_query;
    		$image	= "";
    		if(isset($wp_query->query_vars['taxonomy']))
    		{
    			$term 			= get_term_by( 'slug', get_query_var($wp_query->query_vars['taxonomy']), $wp_query->query_vars['taxonomy']);
    
    			if(!empty($term->term_id))
    			{
    				$attachment_id 	= get_woocommerce_term_meta($term->term_id, 'thumbnail_id');
    
    				if(!empty($attachment_id))
    				{
    					$image = wp_get_attachment_image( $attachment_id, $image_size, false, array('class'=>'category_thumb'));
    					if($image) echo "<div class='page-thumb'>{$image}</div>";
    				}
    			}
    		}
    	}

    This is line of code is specifically responsible for the category featured image:

    if($image) echo "<div class='page-thumb'>{$image}</div>";
    

    Cheers!
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.