OwlCyberSecurity - MANAGER
Edit File: gallery-section.php
<?php /** * Gallery section */ add_shortcode( 'pearl_gallery_section', 'pearl_gallery_section' ); function pearl_gallery_section( $atts ) { extract( shortcode_atts( array( 'pearl_gallery_images' => '' ), $atts ) ); ob_start(); $pearl_gallery_images = explode( ',', $pearl_gallery_images ); if ( is_array( $pearl_gallery_images ) && ! empty( $pearl_gallery_images ) ) { ?> <div class="owl-carousel services-slide"> <?php foreach ( $pearl_gallery_images as $image_id ) { $image_url = wp_get_attachment_image_url( $image_id, 'full' ); echo '<div class="item"><img src="' . $image_url . '" alt="' . get_the_title( $image_id ) . '"></div>'; } ?> </div> <?php } return ob_get_clean(); } /** * Gallery Section */ vc_map( array( "name" => esc_html__( "Pearl Gallery", 'pearl-medical-framework' ), "base" => "pearl_gallery_section", "class" => "", "category" => esc_html__( "MedicalGuide Theme", 'pearl-medical-framework' ), "params" => array( array( "type" => "attach_images", "class" => "", "heading" => esc_html__( "Gallery Images", 'pearl-medical-framework' ), "param_name" => "pearl_gallery_images", "value" => "", "description" => esc_html__( "Upload gallery images.", 'pearl-medical-framework' ) ), ) ) );