Genesis Affiliate Box in Posts

Do you like the Genesis Affiliate Box at the bottom of my posts? Do you need some extra cash? Well, if your’re already a blogger and a Genesis framework user then this is a no-brainer, Brian Gardner will give you 35% commission on all sales! Have you already signed up to become a StudioPress Affiliate?

What are you waiting for the product is awesome! Quick Earnings Example: Someone purchases the Pro-Plus All Theme Package for $349.95.  Your commission would be $122.48 on the sell! I own this package because it gives you access to all current themes and any future themes StudioPress makes. Thanks Brian, you rock!

1. Create the Genesis Affiliate Box

Ok, lets get started. Copy the code below into notepad, change the details to your affiliate code and site details. Save the text file as genesis-box.php, and then upload it into your child theme’s folder. Example location: jasonneuman/wp-content/themes/mindstream

<div id="genesis-box">
<h3>JasonNeuman.com runs on the Genesis Framework</h3>
<a href=" http://www.jasonneuman.com/go/genesis"><img class="alignright" title="Check out the Genesis Framework" alt="Genesis Framework" src="/download/genesis-box.png" /></a>

StudioPress <a href=" http://www.jasonneuman.com/go/genesis">Genesis Framework</a> empowers you to quickly and easily build incredible websites with WordPress. <a href=" http://www.jasonneuman.com/go/genesis">Genesis</a> provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible <a href=" http://www.jasonneuman.com/go/genesis">features</a> and the selection of <a href=" http://www.jasonneuman.com/go/genesis">designs</a>. <strong>It's that simple - start using <a href="http://www.jasonneuman.com/go/genesis">Genesis</a> now!</strong></div>
<pre>

Download the Genesis Affiliate Box image. Save the image to your desktop and upload it to the image directory on your hosting. Don’t forget to change the code above with your image location as it may be different than mine.

2. Hook Genesis Affiliate Box in Posts

Hook it with the code below so that the Genesis Affiliate box will appear on all your posts. Just copy the code below into your Theme Functions in the WordPress dashboard (Appearance > Editor > functions.php).

/** Add Genesis Box on Single Posts */
add_action( 'genesis_after_post_content', 'include_genesis_box', 11 );
function include_genesis_box() {
    if ( is_single() )
    require( CHILD_DIR.'/genesis-box.php' );
}

3. Genesis Affiliate Box Style

Almost time to have a drink! We need to put a little style on this Genesis Box to get it ready for the runway. Now, copy the code below into your style.css in the WordPress dashboard (Appearance > Editor > Stylesheet). I know that everyone’s style is silently different, so dress the Genesis Affiliate Box how you like. That’s it!

/* Genesis Box
------------------------------------------------------------ */

#genesis-box {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
     box-shadow: none;

     background-color: #f5f5f5;
     padding: 8px 15px !important;
}

#genesis-box h3 {
    color: #333;
    font-size: 20px;
    font-weight: normal;
    margin: 0 0 10px;
    padding: 0;

}

#genesis-box a:hover {
    text-decoration: underline;
}

#genesis-box .alignright {
    border: 5px solid #999;
    float: right;

}

Comments

  1. says

    Hi, I chanced upon your blog as I’m looking for solution on how to configure the genesis box. But after following your guide I still can’t seems to figure them. Can you advice?

  2. Jason Neuman says

    Yes I ran into this same problem on a new site design recently. After the Genesis theme updates (HTML 5) the above solution no longer works the way that I have it setup on my site.

    New solution:

    Install genesis simple hooks plugin – Download

    Paste code below – “genesis_before_comments” Hook (located in dashboard genesis > simple hooks after installing the plugin and activating. Don’t forget to change code wording to fit your site.

    <div id="genesis-box">
    <h3>JasonNeuman.com runs on the Genesis Framework</h3>
    <a href=" http://www.jasonneuman.com/go/genesis"><img class="alignright" src="/download/genesis-box.png" alt="Genesis Framework" title="Check out the Genesis Framework"/></a>
    <p>StudioPress <a href=" http://www.jasonneuman.com/go/genesis">Genesis Framework</a> empowers you to quickly and easily build incredible websites with WordPress. <a href=" http://www.jasonneuman.com/go/genesis">Genesis</a> provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.</p></br>
    <p>Check out the incredible <a href=" http://www.jasonneuman.com/go/genesis">features</a> and the selection of <a href=" http://www.jasonneuman.com/go/genesis">designs</a>. 
    It's that simple - start using <a href="http://www.jasonneuman.com/go/genesis">Genesis</a> now!</br><strong> &#10141; Need help? Contact <a href="http://neuic.com">Neuic</a> the Genesis Experts!</strong></p>
    </div> 
    

    Also do not forget to add the styling above “Step 3”

    Good luck :-)

  3. says

    I’ve downloaded the plugin and tried your following steps, but no changes. Had also tried adding and removing genesis-box.php, no changes as well. Am i missing out anything?

  4. Jason Neuman says

    If you have a new HTML 5 Genesis theme the genesis-box.php no longer works.

    1. Add the css above to your style.css
    2. Install plugin
    3. Add code above to the section called “genesis_before_comments” in the plugin settings.

    Good luck…

  5. says

    Thanks for this Tutorial…. i use HTML5 theme and everything was fine. i used genesis_after_entry instead of genesis_after_post_content and it worked perfectly i will sugguest you update the code

Leave a Reply

Your email address will not be published. Required fields are marked *