Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Not all portfolio pieces are showing on home page
I have 13 portfolio pieces and only 10 of them are showing on the home page. Do I need to code something or is there a setting that I missed somewhere?
I don't think there is a limit set on these from the tutorial.
One thing to check would be that all 13 portfolio pieces have a featured image set against them.
If you haven't reached that video yet I've just had a thought on what it could be.
The default posts per page is set to 10.
Can you check Settings > Reading to see what number of posts the Blog pages show at most is set to please? If it is set to 10 can you increase it to say 15 and see if that makes a difference please? You should be able to revert this back when you reach the later videos.
All of the images have featured images set. When I add a new piece it boots the tenth piece out so there is always 10 images. That's why I was wondering if there was a setting or something I missed.
I did not make it to the video with the content-portfolio.php file yet.
Here is my page_portfolio.php:
<?php get_header(); ?> <!-- Content Wrapper --> <div class="content-wrapper large-12 columns clearfix" data-equalizer-watch> <?php $args = array( 'post_type' => 'portfolio' ); $query = new WP_Query($args); ?> <!-- Gallery Thumbs --> <div id="effect-1" class="row small-collapse medium-collapse large-collapse full-width img-hover" data-equalizer-watch> <?php if ($query->have_posts() ) : while ($query->have_posts() ) : $query->the_post(); ?> <?php $image_url = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ); ?> <div class="img small-12 medium-6 large-3 columns left hover"> <a href="<?php echo $image_url; ?>" class="fresco"><?php the_post_thumbnail('thumbnail'); ?></a> <div class="overlay"> <span class="expand"><?php the_title(); ?></span> <a class="close-overlay hide">x</a> </div> </div> <?php endwhile; endif; wp_reset_postdata(); ?> </div> <!-- End Gallery Thumbs --> <?php get_footer(); ?>
I created my own html based off of foundation.
The amount of blog post setting is it!
Thank you very much for taking the time to help.