wp pagination dont show in homepage
<p><strong>Now i tried to go pdf-market.ir/?paged=2 but it's show 404 Error !</strong>
check site, <a href="http://pdf-market.ir" rel="nofollow">site</a> <a href="http://pdf-market.ir/?s=%DA%A9%D8%AA%D8%A7%D8%A8" rel="nofollow">search</a> </p>

<p>i 1day tried to solve this problem but don't succed.
my codes for loop in index.php</p>

<pre><code>&lt;ul class="page_result"&gt;
              &lt;?php
              //$paged = (get_query_var('page')) ? get_query_var('page') :  1;
        $args = array(
            'post_type' =&gt; 'product',
            'stock' =&gt; 1,
            'posts_per_page' =&gt; 16,
            'orderby' =&gt; 'date',
            'order' =&gt; 'DESC',
            'paged' =&gt; 1,
            );
        $loop = new WP_Query( $args );
        while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); global $product;   ?&gt;
          &lt;div class="bookbox"&gt;
              &lt;a id="id-&lt;?php the_id(); ?&gt;" href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;
            &lt;div class="bookbox-img"&gt;
               &lt;?php if (has_post_thumbnail( $loop-&gt;post-&gt;ID )) echo get_the_post_thumbnail($loop-&gt;post-&gt;ID, 'shop_catalog'); else echo '&lt;img src="'.woocommerce_placeholder_img_src().'" alt="Placeholder" style="margin-left: -20px" width="200px" height="200px" /&gt;'; ?&gt;
               &lt;/div&gt;
              &lt;/a&gt;
              &lt;div class="bookbox-bookname"&gt;&lt;a data-tooltip="&lt;?php the_title(); ?&gt;" class="bookname tooltip" href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/div&gt;
                        &lt;?php $mid_var = get_post_meta($post-&gt;ID, 'پدیداورنده',true);
            if(isset($mid_var) &amp;&amp; !empty($mid_var)) : ?&gt;
              &lt;div class="bookbox-dtibook"&gt;&lt;span class="garyYekan10"&gt;پدیدآورنده:&lt;/span&gt; 
            &lt;?php echo get_post_meta($post-&gt;ID, 'پدیداورنده',true); ?&gt;
             &lt;/div&gt;&lt;?php endif; ?&gt;
                    &lt;?php $mid_var = get_post_meta($post-&gt;ID, 'ناشر',true);
            if(isset($mid_var) &amp;&amp; !empty($mid_var)) : ?&gt;
              &lt;div class="bookbox-dtibook"&gt;&lt;span class="garyYekan10"&gt;ناشر: &lt;/span&gt;
            &lt;?php echo get_post_meta($post-&gt;ID, 'ناشر',true); ?&gt;
              &lt;/div&gt;
              &lt;?php endif; ?&gt;
                    &lt;?php $mid_var = get_post_meta($post-&gt;ID, 'نوبت چاپ',true);
            if(isset($mid_var) &amp;&amp; !empty($mid_var)) : ?&gt;
              &lt;div class="bookbox-dtibook"&gt;&lt;span class="garyYekan10"&gt;نوبت چاپ:&lt;/span&gt;
                &lt;?php echo get_post_meta($post-&gt;ID, 'نوبت چاپ',true); ?&gt;
              &lt;/div&gt; 
            &lt;?php endif; ?&gt;
              &lt;div class="bookbox-price"&gt;&lt;span class="garytahoma8"&gt;قیمت: &lt;/span&gt; &lt;?php woocommerce_template_loop_price() ?&gt; &lt;/div&gt; 
                    &lt;?php $mid_var = get_post_meta($post-&gt;ID, 'موجودی',true);
            if(isset($mid_var) &amp;&amp; !empty($mid_var)) : ?&gt;
              &lt;div class="bookbox-price"&gt;&lt;span class="garytahoma8"&gt;موجودی: &lt;/span&gt;&lt;span class="fontgreen10"&gt;
            &lt;?php echo get_post_meta($post-&gt;ID, 'موجودی',true); ?&gt;
              &lt;/span&gt; &lt;/div&gt;&lt;?php endif; ?&gt;
              &lt;a alt="مشخصات کتاب" href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;div title="مشخصات کتاب" alt="مشخصات کتاب" class="bookbox-bookinfo"&gt;&lt;/div&gt;&lt;/a&gt;
              &lt;a alt="خرید کتاب" href="&lt;?php the_permalink(); ?&gt;&amp;add-to-cart=&lt;?php the_id(); ?&gt;"&gt;
              &lt;div alt="خرید کتاب" class="bookbox-addcart"&gt;&lt;/div&gt;
              &lt;/a&gt;


              &lt;/div&gt;

        &lt;?php endwhile; ?&gt;
        &lt;?php wp_reset_postdata(); ?&gt;
&lt;/ul&gt;   

&lt;div class="pagination"&gt;
    &lt;?php 
    wp_pagination(); ?&gt;
&lt;/div&gt;
</code></pre>

<p>and my code in function.php > pagination</p>

<pre><code>&lt;?php
function wp_pagination() {
    global $wp_query;
    $big = 12345678;
    $page_format = paginate_links( array(
        'base' =&gt; str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
        'format' =&gt; '?paged=%#%',
        'current' =&gt; max( 1, get_query_var('paged') ),
        'total' =&gt; $wp_query-&gt;max_num_pages,
        'type'  =&gt; 'array'
    ) );
    if( is_array($page_format) ) {
                $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
                echo '&lt;div&gt;&lt;ul&gt;';
                foreach ( $page_format as $page ) {
                        echo "&lt;li&gt;$page&lt;/li&gt;";
                }
               echo '&lt;/ul&gt;&lt;/div&gt;';
    }
}
?&gt;
</code></pre>

<p>this is all...
in searches and archives is show pagination but
in home page and example:site.com dont show pagination and it's place just free and no code...</p>