title: Enforcing posts per page specified in WordPress settings
body: <p>Problem is that despite specifying "posts per page" to be 9 in WordPress settings area,<br>
  WordPress is NOT counting the post that is injected by the awesome plugin below, 
  therefore my website will display a total of 10 posts (9 posts plus 1 injected post).
  How can I make WordPress count the injected post?  </p>
  
  <p>-My posts are displayed in a 3 column layout.<br>
  -I am using the plugin below to inject a post from a specific category called "sponsor".<br>
  -In WordPress admin area > Settings > Reading > I set "posts per page" to be 9.  </p>
  
  <p>This matters because if I have 2 posts in the category "sponsor" that I want to inject,<br>
  then page 1 will display the first sponsored post,<br>
  and page 2 will display the second sponsored post,<br>
  but page 3 and beyond will display nothing (which is correct because there are no more "sponsor" posts)<br>
  so the layout will show empty space. </p>
  
  <p>.<br>
  <strong>Workaround that did not work</strong>  </p>
  
  <p>Using $paged and changing posts_per_page for $paged &lt; 3 caused the plugin to NOT properly work. 
  It would not display injected post for page 2. 
  <a href="https://stackoverflow.com/questions/26571578/different-posts-per-page-depending-on-page-number">See $paged code here</a></p>
  
  <p>.<br>
  <strong>Problem: Need WordPress to count the post (injected by the plugin)</strong></p>
  
  <p>X represents my posts<br>
  O represents sponsored posts injected by the plugin<br>
  If I have 2 posts in "sponsor" category, page 3 and beyond will not have a "sponsor" post to inject so will have empty space:  </p>
  
  <pre><code>Page 1    Page 2     Page 3  
  
  X X X      X X X      X X X  
  X X X      X X X      X X X  
  X O X      X O X      X X  
  </code></pre>
  
  <p><strong>Plugin</strong></p>
  
  <p><a href="https://gist.github.com/birgire/439e36a6b08f1159f653" rel="nofollow noreferrer">Click Here</a> for the Github plugin code.</p>