load all content on 1 page

i am creating a gallery with all images to be displayed on 1 page itself however only about 10 images of the latest uploaded are displayed...how do i get all of them to be displayed below is my code

<?php get_header(); ?>          


<article>

            <?php while (have_posts()) : the_post(); ?> 

                        <div class="index">
                          <div class="thumb"><?php the_post_thumbnail('')?> </div>
                        </div>

            <?php endwhile; ?>
</article>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

Solutions

The basic WordPress setup only calls out the last 10. You'll need to make your own query to be able to run more posts through.

Try this out:

<?php get_header(); ?>          


<article>

    <?php
        $query = new WP_Query( 'posts_per_page=-1' );
        while ($query->have_posts()) : $query->the_post(); 
    ?> 

        <div class="index">
            <div class="thumb"><?php the_post_thumbnail('')?> </div>
        </div>

    <?php endwhile; ?>
</article>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

The full explanation can be found in the codex.

Details about the usage above can be found HERE

the problem is you are running this with Standard WordPress Loop. Normally the standard WordPress Loop is bounded to ten. This you can change in Settings -> Reading -> Blog pages show at most

but if you don't want to change it there you need to put this before the loop

wp_reset_query();
query_posts( 'posts_per_page=10000' ); // will proably show 10000 now as seen in the other answers -1 should show all

which starts with

<?php while (have_posts()) : the_post(); ?> 

http://codex.wordpress.org/Function_Reference/query_posts https://codex.wordpress.org/Function_Reference/wp_reset_query

so far so good?

Similar questions

jQuery ColorBox grouping of all images in all posts (or all posts on a page, like blog page) (Wordpress)
Does anyone know how can we group all images in all posts in Wordpress blog using jQuery ColorBox plugin? I am trying to achieve ColorBox effects that group all images in the whole blog into a gallery where you can go back and forth through all these images in ColorBox.
Google Analytics Page Load Times vs Pingdom Page Load Times.
I am examining the page load time numbers in GA and Pingdom. My avg via pingdom is consistently 3 seconds, or around that. My page load time in GA is consistently around 10 seconds. Can anyone explain the technical reason for this difference. Please. Any Reference to this information would be helpful, I haven't been able to find a straight answer.
I can't seem to generate content for dynamic content load
I am using wordpress and php along with ajax to create a random loading of customer reviews on our main page function loadContent() { $.ajax({ type: "GET", url: 'http://skillsetsonline.ssosv.com/contentLoader.php', data: { company: 1 }, success: function(data) { alert(data); var currReview = ...
jQuery load() wont reload the div and deletes all its content
I have a JS function that is supposed to reload the content of the sidebar WooCommerce shopping cart every time the customer clicks the "add to cart" button. I have tried using the following code to reload the div the cart is located in, but it only deletes the content of the div. Thank you in advance for any help function reloadCart(){...
wp_head(); isn't allowing all my HTML content to load in WordPress
I have created a template for my WordPress website and for some reason it is not rendering all of my content. Below is the code for it yet for some reason, not all my links in my site navigation are displaying. Does anyone know how I can fix this please? I am having real trouble and could do with some help please.
Need to change all links in page content but not in post content
So usually I would just do a database search and replace for changing my URL but what I've done now is decided to split my site into two different sites which works great for me because of the way I organized content with pages and posts. All the pages have links going to posts on the same site. I'm moving all the posts to it's own site on domain #...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.