WordPress.org

Ready to get started?Download WordPress

Forums

Carousel Horizontal Posts Content Slider
Slider images going to urls (2 posts)

  1. beersj
    Member
    Posted 1 year ago #

    Im wrapping the urls in < a > tags when i add them to the carousel. Is there a way for the slider to use that link and allow me to click on the image to redirect someone?

    Appreciate the work, plugin looks great!

    http://wordpress.org/extend/plugins/carousel-horizontal-posts-content-slider/

  2. subhansanjaya
    Member
    Plugin Author

    Posted 1 year ago #

    (Line #35-53 )
    Please, use this code -

    foreach( $myposts as $post ){
    
    		$post_title = $post->post_title;
    		$post_link =  get_permalink($post->ID);
    		$post_content = $post->post_content;
    		$displaydesc= $word_imit;
    
    		$slider_gallery.= '<div id="foo_content">';
    
    		if($displayimage=="YES"){
    			$slider_gallery.= '<a href="'.$post_link.'">'.attachment_image_filter($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"').'</a>';
    		}
    		//$slider_gallery.= '<br/><h2>'.$post_title.'</h2><br/>';
    		//$slider_gallery.= '<p><span class="foo_con">'.tchpcs_clean($post_content, $displaydesc).'</span></p>...';
    
    		//$slider_gallery.= '<br/><span class="more"><a href="'.$post_link.'">read more</a></span>';
    		$slider_gallery.= '</div>';
    
    	}

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.