badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

scarroll

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Removing links on featured slider #6694
    scarroll
    Participant

    that should read <?php ?>

    in reply to: Removing links on featured slider #6682
    scarroll
    Participant

    OK, ignore my post above, I forgot to put <?php /> around the above code. The links have gone, brilliant!
    Thanks very much for your help and for this wonderful theme

    in reply to: Removing links on featured slider #6675
    scarroll
    Participant

    I have made a functions.php file and pasted exactly this in it.

    if ( ! function_exists( 'cleanretina_featured_post_slider' ) ) :
    /**
     * display featured post slider
     *
     * @uses set_transient and delete_transient
     */
    function cleanretina_featured_post_slider() {	
    	global $post;
    		
    	global $cleanretina_theme_options_settings;
       $options = $cleanretina_theme_options_settings;
    	
    	$cleanretina_featured_post_slider = '';
    	if( ( !$cleanretina_featured_post_slider = get_transient( 'cleanretina_featured_post_slider' ) ) && !empty( $options[ 'featured_post_slider' ] ) ) {
    		
    		$cleanretina_featured_post_slider .= '
    		<section class="featured-slider"><div class="slider-wrap"><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"; }
    				$cleanretina_featured_post_slider .= '
    				<div class="'.$classes.'">';
    						if( has_post_thumbnail() ) {
    	
    							$cleanretina_featured_post_slider .= '<figure><a href="' . get_permalink() . '" title="'.the_title('','',false).'">';
    	
    							$cleanretina_featured_post_slider .= get_the_post_thumbnail( $post->ID, 'slider', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class'	=> 'pngfix' ) ).'</a></figure>';
    						}
    						if( $title_attribute != '' || $excerpt !='' ) {
    						$cleanretina_featured_post_slider .= '
    							<article class="featured-text">';
    							if( $title_attribute !='' ) {
    									$cleanretina_featured_post_slider .= the_title( '<span>','</span>', false );
    								}
    							if( $excerpt !='' ) {								
    								$cleanretina_featured_post_slider .= $excerpt.'<a href="' . get_permalink() . '" title="'.the_title('','',false).'">'.' '.__( 'Continue Reading', 'cleanretina' ).'</a>';
    							}
    						$cleanretina_featured_post_slider .= '
    							</article><!-- .featured-text -->';
    						}
    				$cleanretina_featured_post_slider .= '
    				</div><!-- .slides -->';
    			endwhile; wp_reset_query();
    		$cleanretina_featured_post_slider .= '</div></div>				
    		<nav id="controllers" class="clearfix">
    		</nav><!-- #controllers --></section><!-- .featured-slider -->';
    			
    	set_transient( 'cleanretina_featured_post_slider', $cleanretina_featured_post_slider, 86940 );
    	}
    	echo $cleanretina_featured_post_slider;	
    }
    endif;

    However the code is appearing at the top of the website (I was going to make the changes as suggested above in the child theme editor)

    Am I copying the function correctly?

    in reply to: Removing links on featured slider #6647
    scarroll
    Participant

    Thanks for replying.

    make your changes there.

    This is the bit I don’t know – what changes do I make to cleanretina_featured_post_slider? I understand I need to copy the function cleanretina_featured_post_slider into my child theme functions.php file but then I don’t know what to do with it.

    I would really appreciate any help with this – it is the only thing left to do on the website and then it is ready

    in reply to: Removing links on featured slider #6455
    scarroll
    Participant

    Ok I’ve worked out that as the above command is not in a template I can’t just change it in a child theme so it overrides the parent theme. I think I know what needs to be done – I need to put a command to remove the action into a functions.php file in the child theme – but am not sure how to do it

    Can anybody tell me if I’m right and what command I need to put in the functions.php file?

Viewing 5 posts - 1 through 5 (of 5 total)