{"id":9055001,"date":"2017-04-21T21:26:10","date_gmt":"2017-04-21T21:26:10","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=topic&#038;p=9055001"},"modified":"2017-04-21T21:26:10","modified_gmt":"2017-04-21T21:26:10","slug":"special-code-every-x-posts","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/special-code-every-x-posts\/","title":{"rendered":"Special Code Every X Posts"},"content":{"rendered":"<p>Hello,<\/p>\n<p>Love the plugin, it is one of the most professional options out there. Right now I am trying to have the template display posts, and every say 5 or so posts it displays a script for some advertisement or an &#8220;around the web&#8221; type box. <\/p>\n<p>The only issue is I can for the life of me not get it to work. If we have anything in the box with a condition it will just not render anything.<\/p>\n<p>I have even tried just adding in code to display text every 5 posts. yet still no dice.<\/p>\n<p>I welcome your help on the matter.<\/p>\n<p>Here is the code right now, and it refuses to render.<\/p>\n<pre><code>&lt;li&lt;?php if (! has_post_thumbnail() ) { echo &#039; class=&quot;no-img&quot;&#039;; } ?&gt;&gt;\n   &lt;?php if ( has_post_thumbnail() ) {\n      the_post_thumbnail(array(150,150));\n   }?&gt;\n   &lt;h3&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h3&gt;\n   &lt;p class=&quot;entry-meta&quot;&gt;\n       &lt;?php the_time(&quot;F d, Y&quot;); ?&gt;\n   &lt;\/p&gt;\n   &lt;?php the_excerpt(); ?&gt;\n&lt;\/li&gt;\n&lt;?php\n  if($alm_current === 6){\n   echo &quot;Hello World&quot;;\n  }\n?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-9055001","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9055001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9055001\/revisions"}],"predecessor-version":[{"id":9055011,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9055001\/revisions\/9055011"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=9055001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}