Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    You need to create a “Child-Theme” first.

    After it create a “home-slider.php” file into your “Child-Theme” directory.

    Now copy the below code and paste init.

    <?php $awada_theme_options = awada_theme_options();
    if($awada_theme_options['home_slider_enabled']==1){ ?>
    <div id="slider" class="sl-slider-wrapper demo-2">
    	<div class="sl-slider" >
    		<?php if(isset($awada_theme_options['home_slider_posts']) && $awada_theme_options['home_slider_posts'] != "") {
    			$j = 0;
    			foreach ($awada_theme_options['home_slider_posts'] as $post_id) {
    			$slider = get_post($post_id);
    				if ($j % 2 == 0){	$orientation = 'horizontal';	}
    				else{	$orientation = 'vertical';	}
    			?>
    				<div class="sl-slide" data-orientation="<?php echo $orientation; ?>" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">
    					<div class="sl-slide-inner">
    						<a href="<?php echo esc_url(get_post_permalink($slider->ID)); ?>"><?php echo get_the_post_thumbnail($slider->ID, 'awada_home_slider_bg_image', array('class' => 'img-responsive bg-img')); ?></a>
    						<a href="<?php echo esc_url(get_post_permalink($slider->ID)); ?>"><h2><?php echo esc_attr($slider->post_title); ?></h2></a>
    						<blockquote><p><?php echo esc_attr(wp_trim_words($slider->post_content, 8, '...')); ?></p></blockquote>
    					</div>
    				</div>
    		<?php $j++; //endif;
    		} } else {
    			$slider_title = array(__('Highly Customizable', 'awada'), __('Responsive Theme', 'awada'), __('Corporate Theme', 'awada'));
    			for($j=1 ; $j<=3 ; $j++){
    			if ($j % 2 == 0){	$orientation = 'horizontal';	}
    				else{	$orientation = 'vertical';	} ?>
    					<div class="sl-slide" data-orientation="<?php echo $orientation; ?>" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">
    						<div class="sl-slide-inner">
    							<img class="img-responsive bg-img" src="<?php echo get_template_directory_uri(); ?>/images/slider/s<?php echo $j; ?>.jpg">
    							<h2><?php echo esc_attr($slider_title[$j-1]); ?></h2>
    							<blockquote><p><?php _e('Lorem ipsum dolor sit amet, consectetur.', 'awada'); ?></p></blockquote>
    						</div>
    					</div>
    		<?php } $j=3;
    		} ?>
    	</div><!-- /sl-slider -->
    	<?php if($j>1){ ?>
    	<nav id="nav-arrows" class="nav-arrows">
    		<span class="nav-arrow-prev"><?php _e('Previous', 'awada'); ?></span>
    		<span class="nav-arrow-next"><?php _e('Next', 'awada'); ?></span>
    	</nav>
    				
    	<nav id="nav-dots" class="nav-dots">
    		<?php for($i=1; $i<=$j; $i++) { ?>
    			<span <?php echo $i==1 ? 'class="nav-dot-current"' : ""; ?>></span>
    		<?php } ?>
    	</nav>
    	<?php } ?>
    
    </div><!-- /slider-wrapper -->
    <?php } ?>
    

    Save the changes.

    Let us know for further assistance.

    Thank You

    Thread Starter einsteinsolutions88

    (@einsteinsolutions88)

    Hej,

    Thanks a lot. The links are activated in the slider.

    But my permalinks seem to be bad. The first picture of the slider is going to:
    https://einstein-empowerment.academy/%tag%/opstellingenwerk-groot-succes/
    Which shows:
    Bad Request
    Your browser sent a request that this server could not understand.

    Could you help me with this?

    Kind regards and thanks in advance.

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    Go to dashboard Admin Panel >> Settings >> Permalinks >> Permalink Settings.

    Now check your permalink settings and select “Post name” permalink setting.

    And save the changes.

    Let us know for further assistance.

    Thank You

    Thread Starter einsteinsolutions88

    (@einsteinsolutions88)

    problem solved!

    Thanks again,

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    You are most welcome.

    Thank You

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Slider clickable – linkable?’ is closed to new replies.