Support » Theme: Attitude » Slider problem ! Maby we will closed subject with succes ?

  • I have Child theme

    <?php
    
    if ( ! function_exists( 'attitude_featured_post_slider' ) ) {
    function attitude_featured_post_slider() {
    	global $post;
    
    	global $attitude_theme_options_settings;
       $options = $attitude_theme_options_settings;
    
    	$attitude_featured_post_slider = '';
    	if( ( !$attitude_featured_post_slider = get_transient( 'attitude_featured_post_slider' ) ) && !empty( $options[ 'featured_post_slider' ] ) ) {
    
    		if( 'wide-layout' == $options[ 'site_layout' ] ) {
    			$slider_size = 'slider-wide';
    		}
    		else {
    			$slider_size = 'slider-narrow';
    		}
    
    		$attitude_featured_post_slider .= '
    		<section class="featured-slider"><div class="slider-cycle">';
    			$get_featured_posts = new WP_Query( array(
    				'posts_per_page' 			=> $options[ 'slider_quantity' ],
    				'post_type'					=> array( 'post', 'page' ),
    				'post__in'		 			=> $options[ 'featured_post_slider' ],
    				'orderby' 		 			=> 'post__in',
    				'ignore_sticky_posts' 	=> 1 						// ignore sticky posts
    			));
    			$i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++;
    				$title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) );
    				$excerpt = get_the_excerpt();
    				if ( 1 == $i ) { $classes = "slides displayblock"; } else { $classes = "slides displaynone"; }
    				$attitude_featured_post_slider .= '
    				<div class="'.$classes.'">';
    						if( has_post_thumbnail() ) {
    
    							$attitude_featured_post_slider .= '<figure>';
    
    							$attitude_featured_post_slider .= get_the_post_thumbnail( $post->ID, $slider_size, array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class'	=> 'pngfix' ) ).'</figure>';
    						}
    						if( $title_attribute != '' || $excerpt !='' ) {
    						$attitude_featured_post_slider .= '
    							<article class="featured-text">';
    							if( $title_attribute !='' ) {
    									$attitude_featured_post_slider .= '<div class="featured-title">'. get_the_title() . '</div><!-- .featured-title -->';
    							}
    							if( $excerpt !='' ) {
    								$attitude_featured_post_slider .= '<div class="featured-content">'.$excerpt.'</div><!-- .featured-content -->';
    							}
    						$attitude_featured_post_slider .= '
    							</article><!-- .featured-text -->';
    						}
    				$attitude_featured_post_slider .= '
    				</div><!-- .slides -->';
    			endwhile; wp_reset_query();
    		$attitude_featured_post_slider .= '</div>
    		<nav id="controllers" class="clearfix">
    		</nav><!-- #controllers --></section><!-- .featured-slider -->';
    
    	set_transient( 'attitude_featured_post_slider', $attitude_featured_post_slider, 86940 );
    	}
    	echo $attitude_featured_post_slider;
    }
    }

    But id doesent wor, why?

    I alsow use CSS style modification like

    .featured-text .featured-title a {
    pointer-events: none; /* remove link between slider title and pages */
    }
    .featured-slider .displayblock a{
    pointer-events: none; /* remove link between slider title and pages */
    }

    Result is only on first image or text slider, but on the secosnd image link direction still works

  • The topic ‘Slider problem ! Maby we will closed subject with succes ?’ is closed to new replies.