Sometimes its a good idea to add advertisements or content after the first post in WordPress. The following tutorial will also show you how to do it on a Genesis framework.
Add advertisements or content after the first post in WordPress
In the picture below we see an advertisement after the first post on SawDustGirl.com. Then the posts continue as they normally would.
In order to accomplish this task open up your index.php in your child theme. You can do it in a parent theme but when you update the theme your changes will be overwritten and you will have to do this process all over again.
Copy the code below and paste it in the while loop. See video for detailed instructions on this process.
[code]<?php
global $wp_query;
if( ($wp_query->current_post == 0) ) {
?>
<div>
YOUR CONTENT OR SCRIPT
</div>
<?php
}
?>[/code]
If you only want the additional content to appear on archived pages you can use the code below and past it into your archive.php in the while loop.
[code]<?php
global $wp_query;
if( ($wp_query->current_post == 0) && is_archive() ) {
?>
<div>
YOUR CONTENT OR SCRIPT
</div>
<?php
}
?>[/code]
Add advertisements or content after the first post in Genesis
First of all make sure that you have Simple Hooks installed on your Genesis Framework. Once you are sure of that look for Simple Hooks under the Genesis Tab.
Scroll down to where it says genesis_after_post_content Hook and past the code below. replace YOUR CONTENT HERE with whatever you need to replace it with. Make sure that you check the box “Execute PHP on this hook.
[code]<?php
global $wp_query;
if( ($wp_query->current_post == 0) ) {
?>
<div>
YOUR CONTENT HERE
</div>
<?php
}
?>[/code]
Add Content before or after each post or title
Please see our WordPress Functions page after watching this video.


A1WEBSITEPRO Social Media Pages
Here are my social media pages.