Dear Developer,
I have two questions about placing the content between specific posts:
1) I want to place content after specific posts on the homepage – say after 1st and 3rd post.
The code I’d use would look like this:
<?php if (($count == 1) || ($count == 3)): ?>
CODE HERE
<?php endif; $count++; ?>
Where should I place the code precisely, so that the content is displayed “inside” the post box (right under the text: Posted in Uncategorized| Leave a reply), and not under the post, but outside the post area (between the two post boxes). Normal location for the code – inside the main loop, results in the content being displayed between the posts, but outside the post area.
Second case – placing the content between the posts, but outside the post area: how to center it, so that left and right margins are the same, as well as the top and bottom margins (so that the spacing above and below the content is equal)?
2) How to center the above content so it is displayed with the same left and right padding inside the post box? What code should I use and where? Placing the content code inside the <div style=”text-align: center;”></div> ruins the layout of the sidebar.
Thank you
Best regards