[resolved] Homepage post scrolling box not displaying custom posts?? (2 posts)

  1. thaiso
    Posted 2 years ago #


    I have been at this now for about 12 hours I just don't know what I am doing.

    My theme has a home page post display scroller which shows posts from a selected category. At the moment it is only showing normal posts.

    Could someone please tell me how to make it show the custom type posts from that category aswell. The code for the scroller is:

    function get_home_scroll( $cat_data ){ ?>
        wp_enqueue_script( 'tie-cycle' );
    	$Cat_ID = $cat_data['id'];
    	$Posts = $cat_data['number'];
    	$Box_Title = $cat_data['title'];
    	$cat_query = new WP_Query('cat='.$Cat_ID.'&posts_per_page='.$Posts);
    		<section class="cat-box scroll-box">
    			<div class="cat-box-title">
    				<h2><?php echo $Box_Title ; ?></h2>
    				<div class="stripe-line"></div>
    			</div><!-- post-thumbnail /-->
    			<div class="cat-box-content">
    				<?php if($cat_query->have_posts()): ?>
    				<div  id="slideshow<?php echo $Cat_ID ?>">
    				<?php while ( $cat_query->have_posts() ) : $cat_query->the_post()?>
    					<div class="scroll-item">
    						<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?>
    							<div class="post-thumbnail">
    								<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'tie' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
    									<?php tie_thumb('',272,125); ?>
    							</div><!-- post-thumbnail /-->
    						<?php endif; ?>
    						<h3><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'tie' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    						<p class="post-meta">
    							<?php tie_get_time() ?>
    							<?php tie_get_score(); ?>
    				<?php endwhile;?>
    				<div class="clear"></div>
    				<div id="nav<?php echo $Cat_ID ?>" class="scroll-nav"></div>
    					<?php endif; ?>
    			</div><!-- .cat-box-content /-->
    		<div class="clear"></div>
    <script type="text/javascript">
    	jQuery(document).ready(function() {
    		var vids = jQuery("#slideshow<?php echo $Cat_ID ?> .scroll-item");
    		for(var i = 0; i < vids.length; i+=4) {
    		  vids.slice(i, i+4).wrapAll('<div class="group_items"></div>');
    		jQuery(function() {
    			jQuery('#slideshow<?php echo $Cat_ID ?>').cycle({
    				fx:     'scrollHorz',
    				timeout: 3000,
    				pager:  '#nav<?php echo $Cat_ID ?>',
    				slideExpr: '.group_items',
    				speed: 300,
    				pause: true
    <?php } ?>


  2. mbigul
    Plugin Author

    Posted 2 years ago #

    Dear thaiso,

    I feel this issue related to your WP_Query. Please check following link for more details. http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.