• Resolved jackmcdowell

    (@jackmcdowell)


    I’m looking to change the carousel template to this so that I can use a custom image size, but just changing the template doesn’t make the change permanent. Is there a hook or a place in my child theme where I can place it?

    
      <div class="slick-image-slide">
      
    		<?php
    $sliderurl = get_post_meta( get_the_ID(),'wpsisac_slide_link', true );
    		echo ($sliderurl !='' ? '<a href="'.$sliderurl.'">' : '');
    		if($sliderimage_size == '' || $sliderimage_size == 'medium')  { 
    				 the_post_thumbnail('medium'); 			 
    			} elseif ($sliderimage_size == 'large') {			
    				the_post_thumbnail('large'); 
    			} elseif ( $sliderimage_size == 'original') {
    				the_post_thumbnail('url'); 
    			} elseif ( $sliderimage_size == 'thumbnail') {
    				the_post_thumbnail('thumbnail'); 
    			} elseif ( $sliderimage_size == 'carousel') {
    				the_post_thumbnail('carousel'); 
    			}  else {
    				 the_post_thumbnail('medium'); 			
    			}
    		echo ($sliderurl !='' ? '</a>' : '');
    	 ?>
    
    	</div>
    

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Sorry for the late reply.

    there is short-code parameter for the image size ‘image_size’. So, you can change the custom image size with short-code parameter.

    like [slick-carousel-slider image_size=”large”].
    here in image_size=”” you can pass the value like (large, original, thumbnail, medium).

    Thread Starter jackmcdowell

    (@jackmcdowell)

    Thanks for the reply. Right, the issue is that I created a special image size which is 0 400, so that the width will be whatever and the height will always be 400. I did this so that the images wouldn’t be huge and not changing the defaults. I guess I could have just changed the medium or large sizes with a filter but instead I created another one called carousel, so I need to override the template and add carousel.
    Is this possible with a filter or can I place the template (above) in my child theme?

    Hello,

    no, this is not possible with filter because we have not created any filter to override the image size.

    Hello,

    yes you can apply filter for that.

    we’ll take it as a feature request and we’ll update the plugin soon with this functionality.

    Thank you for using our plugin.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom Template’ is closed to new replies.