Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1247320

    Several conflicts arise in the horizontal gallery.

    1. I can’t find how to set the horizontal gallery to loop at the end of the gallery. I’ve seen in previous threads solutions for the parent theme but it doesn’t work for the child theme.

    2. There is some kind of error that when you advance once in the gallery, you do not go to the next image, it is necessary to advance twice, so that it begins to move to the next.

    Can you help me, please?

    #1247635

    Hey Marcos Q.,

    Thank you for the inquiry.

    Are you referring to this modification?

    // https://kriesi.at/support/topic/horizontal-gallery-loop-2/#post-1151997

    To do this in the child theme, we have to create a new shortcode path in the child theme directory and copy the horizontal gallery files in the new path. This documentation should help explain how to override an existing shortcode or element in the child theme.

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    After creating the shortcode path and copying the horizontal gallery files, we have to edit the gallery_horizontal\gallery_horizontal.php file and look for the extra_assets function. This function contains the wp_enqueue_style and wp_enqueue_script functions, which register the script and stylesheet for the element. In those functions, we have to adjust the file path so that it points to the scripts and stylesheets that we have just copied in the child theme, or the files containing the modification. The path should look like this.

    AviaBuilder::$path['pluginUrlRoot'] . 'avia-shortcodes/gallery_horizontal/gallery_horizontal.js'
    

    We have to replace AviaBuilder::$path[‘pluginUrlRoot’] with the child theme directory using the get_stylesheet_directory_uri function, and we might also need to remove the avia-shortcodes path.

    // https://developer.wordpress.org/reference/functions/get_stylesheet_directory_uri/

    Best regards,
    Ismael

    #1250611

    Hello Ismael, can you clarify me about the second point … the bug about the click to pass each image.

    Thank you

    #1250623

    In the funtions of the child theme we have added

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
    
      return $paths;

    And in the Horizontal.php we have left it like this

    wp_enqueue_style( 'avia-module-slideshow', AviaBuilder::$path['pluginUrlRoot'] . 'avia-shortcodes/slideshow/slideshow.css', array( 'avia-layout' ), false );
    
    			//load css
    			wp_enqueue_style( 'avia-module-gallery-hor', AviaBuilder::$path['pluginUrlRoot'] . 'avia-shortcodes/gallery_horizontal/gallery_horizontal.css', array( 'avia-module-slideshow' ), false );
    
    				//load js
    			wp_enqueue_script( 'avia-module-gallery-hor', AviaBuilder::$path['pluginUrlRoot'] . 'avia-shortcodes/gallery_horizontal/gallery_horizontal.js', array( 'avia-shortcodes' ), false, true );
    

    We have introduced the directory that contains the gallery
    config-templatebuilder/avia-shortcodes/gallery_horizontal
    With the same directory structure

    We can’t get it to work. Can you help me?
    I can provide you access data by ftp

    Thank You

    #1251393

    Hi,

    We have introduced the directory that contains the gallery
    config-templatebuilder/avia-shortcodes/gallery_horizontal

    We do not necessarily have to have the same structure as the parent theme because we already create a new shortcode path in the child theme. All we need to do is copy the gallery_horizontal folder including the files (php, css, js) from the parent theme to the new folder called shortcodes that we created and placed inside the child theme directory. After that, edit gallery_horizontal.php file, look for the extra_assets function and adjust the script and stylesheet path so that they point to the modified files in the child theme.

    
    		function extra_assets()
    		{
                            $child_theme_url = get_stylesheet_directory_uri();
    			wp_enqueue_style( 'avia-module-slideshow', $child_theme_url . 'shortcodes/slideshow/slideshow.css', array( 'avia-layout' ), false );
    
    			//load css
    			wp_enqueue_style( 'avia-module-gallery-hor', $child_theme_url . 'shortcodes/gallery_horizontal/gallery_horizontal.css', array( 'avia-module-slideshow' ), false );
    
    				//load js
    			wp_enqueue_script( 'avia-module-gallery-hor', $child_theme_url . 'shortcodes/gallery_horizontal/gallery_horizontal.js', array( 'avia-shortcodes' ), false, true );
    
    		}
    

    Best regards,
    Ismael

    #1258121

    Hi,
    I tried the instructions above to solve the problem, that you have to cklick twice to start forwarding a horizontal gallery? It didn’t work. Can you please provide further instructions to solve this.

    Best regards,
    Vera

    #1258516

    Hi Vera,

    Please open a new thread and include WordPress admin login details in private so that we can have a closer look at your site.

    Best regards,
    Rikard

    #1261858

    We are still waiting for an answer to solve the twice click problem

    #1262269

    Hi,

    Thank you for the update.

    Did you enable the “active item” indicator, or the zoom effect? It is true that you have to click twice before the slide moves because it has to go through the first and second item first. It looks like nothing is happening during this transition because the indicator for the active item is probably disabled, or because the zoom effect is not enabled. You have to enable the zoom effect, or find a way to add an indicator for the active item using css or a custom script.

    Best regards,
    Ismael

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