Woocommerce gallery pics not a gallery

Any idea why the woocommerce gallery pics are at the bottom and clickable to a separate page rather than true gallery items that load where the main product image is? I’m having this problem on this site but not another site using the same X theme with woo.

http://pumphoists.com/product/epping-well-and-pump-pulstar-p20-pump-hoist/

Hi There,

Thank you for writing in, please do a testing for a plugin conflict. You can do this by deactivating all third-party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If that does not work, pleased downgrade your Woocommerce to the latest supported version (3.4.2). You can download Woocommerce previous version here (see at the bottom).

Version Compatibility

Downgrade Woocommerce to one of the previous versions without losing any data

Remember to clear all your caching features (plugin, server-side, CDN, and browser’s cache) after the downgrade. This will help you to avoid any potential errors.

Let us know how it goes,
Cheers!

Downgrading to a previous version didn’t work. I went all the way back to v 3.0.7 and still get the same issue with the lightbox.

Also, I found this article. Can you read this and advise?

Hello There,

It seems that you have resolved the issue. When I check the product page, I can click the image and the lightbox is showing up. This is what I am seeing:

By the way, the feature in Woo3.0 has already been implemented. It was added since we have release X theme 5.1.0 (https://theme.co/changelog/#theme-x-5-1-0)

Hope this helps.

I’m sorry, but it’s not fixed. There are still lots of issues here:

  1. The reason it looks the way it does (in your screen shot above) is b/c I took all of the meta data out except for the picture title. If meta is present, it appears under the thumbnail image, which is not attractive at all.

  2. I don’t want this to open as a lightbox. I want this picture to load where the main picture is. In other words, I want the main image area to act as a slider like it used to do.

  3. When you click on the next arrow on the lightbox, it only shows that one image. While that is the only image in the gallery, it’s not the only image I loaded. Why doesn’t the main image go though that lightbox?

I would prefer it to look this way instead, as seen on the site I did for preferred pump:

Hello There,

You might have added a custom code that removes the product gallery slider and the product gallery lightbox. What code did you add in your child theme’s functions.php file? Could you please post the contents of your functions.php file in your next replay?

And if possible, please provide us access to your site so that we can investigate further.

Thank you in advance.

<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Theme functions for X. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Boot Registry // 02. Bootstrap Class // 03. Content Width // 04. Localization // ============================================================================= // Boot Registry // ============================================================================= function x_boot_registry() { return array( 'preinit' => array( 'functions/helpers', 'functions/thumbnails', 'functions/setup', 'tco/tco', 'legacy/setup', 'functions/fonts', 'functions/custom-sidebars', 'functions/portfolio', 'functions/plugins/setup', 'functions/updates/class-theme-updater', 'functions/updates/class-plugin-updater' ), 'init' => array(), 'front_end' => array( 'functions/frontend/view-routing', 'functions/frontend/styles', 'functions/frontend/scripts', 'functions/frontend/content', 'functions/frontend/classes', 'functions/frontend/meta', 'functions/frontend/integrity', 'functions/frontend/renew', 'functions/frontend/icon', 'functions/frontend/ethos', 'functions/frontend/social', 'functions/frontend/breadcrumbs', 'functions/frontend/pagination', 'functions/frontend/featured', 'functions/frontend/conditionals', ), 'logged_in' => array( ), 'admin' => array( 'functions/admin/class-validation', 'functions/admin/class-validation-updates', 'functions/admin/class-validation-theme-options-manager', 'functions/admin/class-validation-extensions', 'functions/admin/setup', 'functions/admin/customizer', 'functions/admin/meta-boxes', 'functions/admin/meta-entries', 'functions/admin/taxonomies' ), 'app_init' => array( 'functions/theme-options', ), 'ajax' => array() ); } // Bootstrap Class // ============================================================================= class X_Bootstrap { private static $instance; protected $registry = array(); protected $theme_option_defaults = array(); public function boot() { // Define Path / URL Constants // --------------------------- define( 'X_TEMPLATE_PATH', get_template_directory() ); define( 'X_TEMPLATE_URL', get_template_directory_uri() ); // Preboot // ------- $x_boot_files = glob( X_TEMPLATE_PATH . '/framework/load/*.php' ); sort( $x_boot_files ); foreach ( $x_boot_files as $filename ) { $file = basename( $filename, '.php' ); if ( file_exists( $filename ) && apply_filters( "x_pre_boot_$file", '__return_true' ) ) { require_once( $filename ); } } // Set Asset Revision Constant (For Cache Busting) // ----------------------------------------------- define( 'X_ASSET_REV', X_VERSION ); // Preinit // -------- $this->registry = x_boot_registry(); $this->boot_context('preinit'); // Theme Option Defaults // --------------------- $this->theme_option_defaults = include X_TEMPLATE_PATH . '/framework/data/option-defaults.php'; if ( is_admin() ) { $this->boot_context('admin'); } add_action( 'init', array( $this, 'init' ) ); add_action( 'admin_init', array( $this, 'ajax_init' ) ); add_action( 'cornerstone_before_boot_app', array( $this, 'app_init' ) ); add_action( 'cornerstone_before_custom_endpoint', array( $this, 'app_init' ) ); add_action( 'cornerstone_before_admin_ajax', array( $this, 'app_init' ) ); add_action( 'cornerstone_before_admin_ajax', array( $this, 'ajax_init' ) ); add_action( 'cornerstone_before_custom_endpoint', array( $this, 'ajax_init' ) ); } public function init() { $this->boot_context('init'); if ( ! is_admin() ) { $this->boot_context('front_end'); } if ( is_user_logged_in() ) { $this->boot_context('logged_in'); } } public function admin_init() { $this->boot_context('admin_init'); } public function app_init() { $this->boot_context('app_init'); } public function ajax_init() { if ( defined( 'DOING_AJAX' ) ) { $this->boot_context('ajax'); } } public function boot_context( $context ) { if ( ! isset( $this->registry[$context] ) ) { return; } foreach ( $this->registry[$context] as $file ) { require_once( X_TEMPLATE_PATH . "/framework/$file.php" ); } do_action( 'x_boot_' . $context ); } public static function instance() { if ( ! isset( self::$instance ) ) { self::$instance = new X_Bootstrap(); } return self::$instance; } public function get_theme_option_defaults() { return $this->theme_option_defaults; } public function get_theme_option_default( $key ) { return isset( $this->theme_option_defaults[$key]) ? $this->theme_option_defaults[$key] : false; } } function x_bootstrap() { return X_Bootstrap::instance(); } x_bootstrap()->boot(); // Content Width // ============================================================================= if ( ! isset( $content_width ) ) : $stack = x_get_stack(); switch ( $stack ) { case 'integrity' : $content_width = x_post_thumbnail_width() - 120; break; case 'renew' : $content_width = x_post_thumbnail_width(); break; case 'icon' : $content_width = x_post_thumbnail_width(); break; case 'ethos' : $content_width = x_post_thumbnail_width(); break; } endif; add_filter( 'wp_image_editors', 'change_graphic_lib' ); function change_graphic_lib($array) { return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); } // Localization // ============================================================================= load_theme_textdomain( '__x__', X_TEMPLATE_PATH . '/framework/lang' );

Hi @ppe29,

The login credentials are wrong, and nothing in your functions.php. Please provide the correct login then for the meantime, please disable the responsive lightbox plugin and test it again.

Then please install a child theme and activate it, then add this code to the child theme’s functions.php

add_action( 'after_setup_theme', 'yourtheme_setup' );

function yourtheme_setup() {
add_theme_support( 'wc-product-gallery-slider' );
}

Please don’t add it to the functions.php that provided above, that’s the original. Please add it in the child theme instead.

Thanks!

I’m sorry. I gave you the wrong password. I revised the secure note above with the correct password. Also, I’m not using a child theme.

When I try to deactivate that plugin, I get an error message:

Fatal error: Out of memory (allocated 106168320) (tried to allocate 903603 bytes) in /home1/pulstar90/pumphoists.com/wp-includes/functions.php on line 351

Then when I go back to the plugins, it still shows as active.

Also, I’m using that lightbox plugin elsewhere on the site, so deactivating it will cause an issue when viewing the smaller pictures in the middle of pages like this: http://pumphoists.com/p8-pump-hoist/

Hi,

Let’s fix the error first.

The error means that you are out of memory.

Please contact your host to increase your allocated memory or do it yourself by adding this code in your wp-config.php file located at the root directory of your site.

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Thanks.

OK I added the memory limit code as instructed.

I wanted to give an update on this. I’m sure your suggestion would work. Y’all have been great so far, so there’s no reason to think otherwise. I’m using the woocommerce function as a gallery and, after some thought, the client decided he didn’t want multiple pictures there… for now.

If he changes his mind, I know exactly what to do.

Cheers!

Hello There,

You haven’t install a child theme yet. Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

After the child theme is set up, as responded by @Rad, please add the following code in your child theme’s functions.php file

add_action( 'after_setup_theme', 'yourtheme_setup' );
function yourtheme_setup() {
  add_theme_support( 'wc-product-gallery-slider' );
}

We would loved to know if this has work for you. Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.