Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #13086

    I’d like to use the first image in my product gallery as the background, but not subsequent images.

    check out an example here

    I need a slideshow at the top to show multiple images of the product, but I don’t want a background slideshow in addition to that. I just want to use one image (the first image in the gallery is fine) as the background.

    It would be MUCH better if I could just choose the background that is being used per product, that way I could use any image (one that is not in the slideshow in the product info area) as my background.

    Any ideas on how this could be accomplished?


    I changed this product’s post to have just one image in the Flashlight gallery, and two images in the post / WP gallery.

    It would be ideal for my use if the slideshow at the top looked to the post / WP gallery to find which files to use for the slideshow at the top.

    If I find a solution I’ll post it.

    That would enable me to have a background image of my choosing, and also have multiple images for the product.


    Sorry for so many posts.

    It seems the easiest solution would be to setup the “Image Slideshow at top of entry” to pull images from the media gallery.

    I will never use another gallery style for products and I’m ok uploading some images twice (in the case that the product image and gallery image need to be the same image)/

    This is also beneficial because it enables me to upload high res images for my product images, but lower quality images for my backgrounds (quicker loading times and I use a pixel overlay, so you can’t tell the images are pixelated / lower quality).


    Hi fitzpatrick512,

    No worries on posting, if you find a workable solution that is always a benefit to share it with everyone. As far as I know, that specific option of choosing a single background image for the page that isn’t included in the theme’s product gallery would need to be added in as a feature by Kriesi.




    Thanks Devin, I’m going to look into getting this to work the way I’d like and will surely post the results.


    Let us know how it goes :)


    OK, I’ve figured out my solution for this, hopefully this is helpful for someone else.

    Unfortunately I had to strip out some of the theme functionality to get it to work and also make some additions, so these changes would need to be repeated in the case that I want to update my Flashlight theme installation.

    Flashlight uses the first image in the custom gallery uploaded for 3 things:

    The “featured image”

    The first image in the background gallery (if you want to use it)

    The first image in any other gallery on your post.

    For the site I’m building, I didn’t want to have the same image for all three. I wanted to have a different background image for the post or product, separate from the product gallery or featured image.

    The first step was to separate my background gallery from the post gallery (I wanted to use the “Image Slideshow at top of entry” version). I couldn’t figure out how to do that, so I instead added a new gallery.

    I ended up using the “Galleria Galleria” plugin which replaces WordPress’s gallery with a Galleria gallery (, and inserted it into flashlight/includes/loop-index.php and woocommerce/templates/single-product.php.

    So at that point I had my background gallery separate from my main gallery.

    But now the background image was showing up as the thumbnail for products and posts. Flashlight forces the first image in the Flashlight custom gallery to be the “featured image”.

    To remove that functionality so that I could set the featured image to be something other than the background image, I had to do a little surgery:

    The first step was to modify the flashlight/functions.php file and remove the function that hides the “featured image” area in the backend:

    //add thumbnail support only for frontend so the user doesnt see the backend interface which gets automatically populated by the theme

    //remove post thumbnails from page and posts

    //remove post thumbnails from pages, posts and various custom post types



    add_theme_support( 'post-thumbnails' );

    add_action('posts_selection', 'avia_remove_post_thumbnails');

    add_action('init', 'avia_remove_post_thumbnails');


    function avia_remove_post_thumbnails($msg)


    global $post_type;

    $remove_when = array('post','page','portfolio');



    foreach($remove_when as $remove)


    if($post_type == $remove || (isset($_GET) && $_GET == $remove)) { remove_theme_support( 'post-thumbnails' ); };



    return $msg;



    The next step is to remove the functionality that sets the first image as the “featured image”, in flashlight/includes/admin/compat.php




    * This function saves the first slideshow image as featured image so plugins that make use of that feature image are able to retrieve it


    function avia_backend_compatibility_featured_image($post_id, $result)


    $unqiue_id = avia_post_meta($post_id, 'gallery_image');

    if(!$unqiue_id) return;

    $attachment_holder = avia_get_post_by_title( "avia_smart-gallery-of-post-".$unqiue_id);

    if(empty($attachment_holder)) return;

    $attachments = get_children(array('post_parent' => $attachment_holder,

    'post_status' => 'inherit',

    'post_type' => 'attachment',

    'post_mime_type' => 'image',

    'order' => 'ASC',

    'orderby' => 'menu_order ID'));

    $attachmend_id = "";



    $attachments = reset($attachments);


    $attachmend_id = $attachments->ID;


    if($attachmend_id == "" || ($attachmend_id != "" && ! is_numeric($attachmend_id)))


    delete_post_meta($post_id, '_thumbnail_id');




    update_post_meta($post_id, '_thumbnail_id', $attachmend_id);







    fitzpatrick512 thank you for posting your code. Probably it will help some other users too.



Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘use full screen background but disable slideshow for products’ is closed to new replies.