Support » Plugin: Carousel Horizontal Posts Content Slider » The plugin breaks my page

  • Resolved Nacho


    Hi, i’ve put your plugin in my page under a slide and all the content below appears in the wrong place and some carousels with flexslider don´t work.

    I use <?php echo TCHPCSCarousel(); ?> to put it in the page.
    I´ve edited some thing i didn´t want, like the read more button. Also, i played with the css but that´s not the problem.
    This is the code as it is now:

    [ Moderator note: please wrap code in backticks or use the code button. Do not use blockquote. ]

    function Carousel_shortcode()
    	global $wpdb;
    	$displayimage = get_option('tchpcs_displayimage');
    	$word_imit = get_option('tchpcs_word_limit');
    	$qp_showposts = get_option('tchpcs_query_posts_showposts');
    	$qp_orderby= get_option('tchpcs_query_posts_orderby');
    	$qp_order= get_option('tchpcs_query_posts_order');
    	$qp_category= get_option('tchpcs_query_posts_category');
    	//Image slider
    	global $post;
    	$slider_gallery.= '<div class="image_carousel">';
    	$slider_gallery.='<div id="foo1">';
    	$args = array( 'numberposts' => $qp_showposts,  'category' => $qp_category, 'order'=> $qp_order, 'orderby' => $qp_orderby, 'post_type' => 'any'  );
    	$myposts = get_posts( $args );
    	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 (has_post_thumbnail( $post->ID ) ):
    			$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
    			$featured_img = "<img width='180' height='142' src='". $image[0] . "' " . $attributes . " />";
    			$slider_gallery.= '<a href="'.$post_link.'">'.$featured_img.'</a>';
    		//Post title, Post Description, Post read more
    		$slider_gallery.= '<h6><a href="'.$post_link.'">'.$post_title.'</a></h6>';
    		$slider_gallery.= '</div>';
    	return $slider_gallery;

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The plugin breaks my page’ is closed to new replies.