• Does anyone have advice for how to display portfolio items instead of news items in the main page image slider for the Yasmin theme? Obviously, I am not a coder.

    Here is how the theme queries portfolio pages:

    <?php 	$query = new WP_Query( array( 'post_type' => 'portfolio','posts_per_page' =>'3' ) );
    	           	if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();	?>

    Here is how the theme queries slider images:

    <?php 	$count = of_get_option('w2f_slide_number');
    				$slidecat = of_get_option('w2f_slide_categories');
    				$query = new WP_Query( array( 'cat' => $slidecat,'posts_per_page' =>$count ) );
    	           	if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();	?>
    
    		<li>
    				<?php $image_attr = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'top_feature'); ?>
    				<a href="<?php the_permalink() ?>">	<img src="<?php echo $image_attr[0]; ?>"></a>
    
    				<div class="flex-caption">
    					<h3> <?php the_title(); ?></h3>
    				</div>
    
    		</li>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Yasmin Theme – Display Portfolio Projects in Homepage Slide’ is closed to new replies.