• Resolved einsteinsolutions88

    (@einsteinsolutions88)


    Hi there again,

    My slider workes briljantly.

    I am working with the events calender. They ofer a option to put the events in within the blog on my website. I would also like to show the events in de slider like the other blog messages.

    Can you help me with the code or should I ask the support of the events calender in this case?

    Kind regards,

    https://einstein-empowerment.academy/laatste-nieuws/

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

    (@webhuntinfotech)

    Hi,

    have you created a “Child-Theme”?

    If yes, then create a “home-slider.php” file into “Child-Theme” directory.

    Now copy given below code and paste in above create file.

    <?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">
    						<?php echo get_the_post_thumbnail($slider->ID, 'awada_home_slider_bg_image', array('class' => 'img-responsive bg-img')); ?>
    						<h2><?php echo esc_attr($slider->post_title); ?></h2>
    						<blockquote><p><?php echo apply_filters('the_content', $slider->post_content); ?></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 } ?>

    Now save the changes.

    Now try to put event calendar shortcode into slider post.

    Let us know for further assistance.

    Thank You

    Thread Starter einsteinsolutions88

    (@einsteinsolutions88)

    Thank you!

    You are most welcome.

    Thank You

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Events in slider’ is closed to new replies.