Wordpress my query post doesn't display my post with category
<p>I am new to wordpress, I have a post that has a category_name of offer and it has a content, here is the permalink : <code>http://localhost/jcjohn/2016/09/20/what-we-offer/</code></p>

<p>Now I want to display the contents of my post from my section page.</p>

<p>Here is my code inside the section :</p>

<pre><code>&lt;section id = "offer"&gt;
&lt;?php    
    $args = array(
        'type' =&gt; 'post',
        'posts_per_page' =&gt; 3,
        'category_name' =&gt; 'offer',
    );
    $offerBlog = new WP_Query($args);

    if ($offerBlog-&gt;have_post()):
        while ($offerBlog-&gt;have_posts()):
            $offerBlog-&gt;the_post();
            get_template_part('content', get_post_format()); 
        endwhile;
    endif;
    wp_reset_postdata();    
?&gt;
&lt;/section&gt;
</code></pre>