How to Turn VigLink off in Genesis Posts

Need to turn VigLink off for a specific post on a site running a StudioPress theme from the Genesis Framework?

What a mouthful… It’s easy with the right code.  (Jump below to skip the backstory)

Well I did too.  I was working on a site that I have managed for the last few months, and previously developed for a client.

We were running Viglink across the site.  The monetization of the site through Viglink was not something to write home about, however the stats that come with Viglink were very insightful.

We published an article and for a variety of reasons, we needed to insure that the viglink script did not load on this one particular page.  It was creating a couple different types of conflicts unrelated to Viglink itself.

How to turn off Viglink in a Genesis powered theme

So here’s how it works.  You simply need to add a bit of code to your functions.php file.  (I could not find a plugin to do the same thing, but one shouldn’t be too hard to create if you know your way around plugins.

Warning! Don’t go messing with your functions.php file unless you take the proper precautions, backing up your site, database and keeping your working files straight.  In this case Vivmag is hosted on WPEngine and 90% of that is taken care of there as part of the plan.

The Code for custom body classes on a Post

/** Add custom class to posts specified by slug to remove viglink */
add_filter( 'body_class', 'sp_body_class' );
function sp_body_class( $classes ) {
     if ( is_single( 'your-blog-post-slug-here' ))
     $classes[] = 'nolinks';
     return $classes;

StudioPress does offer up how to do this (partly) with pages, but they don’t explicitly state it with individual blog posts. The WordPress Codex makes it easy enough to fill in that gap.

How to Add Custom Body Class

Child themes and a framework are the only way you should build your WordPress site and Genesis has great support for child themes and other WordPress functionality. Knowing my blog is well optimized, secure and easy to update lets me get on with developing content, community and building a business from my blogging. AgentPress is a clean and elegant design, perfect for real estate professionals. Via

VigLink itself wasn’t too helpful.  They actually had two different support pages on the topic that provided two different types of code.  One of them was apparently out of date and doesn’t work.  This is the one that DOES work.  :)

VigLink Developer Guide

If you’re a developer looking for the ideal way to integrate VigLink into your service, you’ve come to the right place. VigLink has built a variety of integration methods that can work across websites (including blogs, forums, web apps), mobile apps, and even desktop apps. In this guide, we document the various ways we make VigLink services available and the controls we provide to developers. Via

Adding Users to Google Analytics & Google Webmaster Tools

The days of sharing your gmail address and account login information for your Google Analytics or Google Webmaster tools are over.  (finally!)

Google offers more secure ways of sharing access to these accounts without having to open up your email and other google tools to a web developer or SEO firm or even your virtual assistant.

Below are instructions and quick links to instruction to help you safely share your information such that you can scale and get help with your site.

Adding a view only google analytics user:

  1. Login to Google Analytics
  2. Select your site in Google analytics
  3. Click on the admin button in upper right hand corner
  4. Profiles should be the default tab selected
  5. Select the Users sub tab
  6. Click +New User
  7. Enter the email address for the person you want to share this with with a Role of User (admin is not necessary)

Note this does have to be an email address for a Google apps email or a gmail account.

Adding a User on an account for Google Webmaster Tools

  1. The process is similar for Google Webmaster tools, although it requires that after a user is allowed access that the additional user must accept and add the site as well.
  2. Here are the quick instructions for adding a user to a Google Webmaster tools account -

Turning Those Open Browser Tabs into A Blog Article – Custom Post Types and Genesis Page Templates

This article has two purposes.  It shows (via the video that will be attached from youtube soon) how I created this article in the first place.  I had a whole mess of tabs opened in my browser and I used a WordPress plugin called WP Roundup, to capture all the titles, links and summaries of those articles to create this article.  That’s what the video shows.

Second, I captured a great deal of my research sources over the last couple days involving my recent work with  Advanced Custom Fields and some advanced page template work in Genesis’ Framework from StudioPress.

This long list of great articles and resources aided me in my recent project building out a new website called WPThemeSpeed.



Code Snippets – Genesis Framework

Child themes and a framework are the only way you should build your WordPress site and Genesis has great support for child themes and other WordPress functionality. The combination of Genesis and Synthesis gives us the power and flexibility we need. Knowing my blog is well optimized, secure and easy to update lets me get on with developing content, community and building a business from my blogging. Code Snippets – Genesis Framework


How to create a Custom Template In Genesis €“ Genesis Tutorials

This has to be one my favorite things when building a child theme with the Genesis Framework. We first want to make sure we create a blank file to use as our template. I always name my file at this step just so I don’t lose track what I am doing (if you are creating a template to overwrite one the default files make sure you name it so; for example: index.php, single.php page.php, ect.). Via



ACF { Working with Nested Repeaters

Description In this tutorial, we will build a simple template to display a nested repeater’s content. Creating the field group The field group will allow us to create multiple to-do  lists, each with a title and items. This field group has been assigned to pages running the “To-do List” template. Via



How I Make Custom Fields Easier in WordPress with Genesis €” Designs By Nick the Geek

I work with custom fields a good amount. Clients want all kinds of easy to fill in data so I work with the Custom Meta Box class from Bill, Jared, and others. I’ve talked about that a fair bit. Via


How to Create a Custom Post Type Archive Page Using Genesis WordPress

Since this post was originally written, Genesis 2.0 was released and now includes built-in support for custom post type archives without the use of a template. I’ve been looking for a way to create an archive template for a custom post type. It’s a great plugin and includes support for items 1-3 above. How to Create a Custom Post Type Archive Page Using Genesis WordPress


Tutorials – Bill Erickson

Please send me some information on your project so I can figure out how best to help you. After this initial email I’ll schedule a quick phone call to review the project and get to know you. Via


Displaying Custom Fields for Genesis

If you’ve ever worked with Genesis framework for WordPress, or even Gravity Forms, you will appreciate this quick tutorial. Gravity Forms has a great feature that allows for you to create a form that users can create Posts, but if you have them add to a Custom Field, it doesn’t display automatically, so you have to figure that out on your own. I’ll start from the Genesis point of view, because I want to. Displaying Custom Fields for Genesis


Conditional Tags « WordPress Codex

For example, you might want to display a snippet of text above the series of posts, but only on the main page of your blog. With the is_home() Conditional Tag, that task is made easy. Note the close relation these tags have to WordPress Template Hierarchy. Conditional Tags « WordPress Codex


Using Custom Post Types And Meta Fields To Add New Content

In the website I recently launched, my client wanted to have the ability to add new videos to the portfolio section of their site. With the need to make this as streamlined and easy to use for a non-techie (and a person new to WordPress) to update, I decided to use custom meta fields on top of a custom post type. The client’s need was also a bit tricky as they had some of their work on YouTube along with other videos being displayed on HBO’s website. Via


Register videos custom post type

Register videos custom post type


Using Custom Post Types – Bill Erickson

When using WordPress, you’re not limited to just Posts and Pages. Those are simply the default post types, and if you want more you can define your own. I recently launched a site for a client called Flatbooks, which sells eBooks online, and the feature I’d like to highlight how you’d set up your own ebook custom post type. Via


Date output // ACF Support

How do i return a date like this 2013-08-25T09: 00-12: 00 when i have it outputting someplace else like this or this D, dd M yy i need it for schema info to show. can you please tell me how to output different formats then the ones being used. Hi @madsynn You can format the date value into any format you with thanks to the great PHP date / time functions. If I use the code above, it breaks the page and nothing will load. Via


PHP: date – Manual

This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. Note that date() will always generate 000000 since it takes an integer parameter, whereas DateTime: : format() does support microseconds. PHP: date – Manual


ACF { Date Picker

Overview The date picker field creates a jquery date selection popup. This field is useful for setting dates to use in your theme. eg. An ertist’s exhibition start and end date. ACF { Date Picker


ACF { Date Picker

Overview The date picker field creates a jquery date selection popup. This field is useful for setting dates to use in your theme. eg. An ertist’s exhibition start and end date. ACF { Date Picker


Create a Custom Page Template in Genesis

This is a riff on a post I wrote last year on how to create a template for a custom post type archive. This time I’ll show you how to create a custom page template that highlights a particular category, or taxonomy, from your WordPress site. You’re not using a site running on the Genesis Framework (although you could certainly take the general concept here and apply it to a non-Genesis site). Via


Difference between Repeater & Flexible Content field // ACF Support

Hi, What’s the difference between “Repeater field” & “Flexible Content field”. A good use for this field is an image gallery Flexible Content This is used for more complex content / widget styled data. This field allows you to create multiple[le layouts and each layout contains different sub fields. Difference between Repeater & Flexible Content field // ACF Support

How to Build a Genesis Child Theme

A child theme is a separate theme that stores all of your specific customizations. That way if the parent theme is ever updated, you don’t lose all your hard work. There’s two more benefits to child themes. How to Build a Genesis Child Theme


// Search Results for ‘display’

I have downloaded your plug-in (eventually going to buy the repeater field and a few other add-on€™s that you offer) but first I need to see if what I€™m wanting to do is, in fact, possible? I€™ve been literally trying to accomplish this for over 2 weeks now and I€™m not having much luck (most likely because I€™m a novice PHP developer, but I know enough). What I want to do is continue utilizing this theme and when I submit a new listing, I need a repeater group (with approximately 5-6 subfields) to display on the front-end form. // Search Results for ‘display’

Column Classes — Genesis Framework

You can create as many posts as you like in order to share with your readers what exactly is on your mind. This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. Three-Columns This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. Column Classes — Genesis Framework

How to Remove Page Titles from Genesis Child Themes

Under certain circumstances, you might want to remove the page title from a Genesis child theme. My code snippets below cover several methods in which you can remove page titles from your entire site, specific pages, posts and other scenarios. Should you fat finger a code snippet and cause the WordPress white screen of death, you can revert to your backup copy. Via


Genesis Hacks Archives – Geoffrey Rickaby

I recently had the task of creating a hierarchical link list that is to be shown on a parent page that will only display sub-pages. To do this I created a custom template page in Studiopress’s Genesis. By creating a custom template, it allowed me to reuse the same code for multipule pages. Genesis Hacks Archives – Geoffrey Rickaby

Move Post Info above Post Title in Genesis

In this example, I am using Genesis Sample.

Entry Header – Genesis Framework

Child themes and a framework are the only way you should build your WordPress site and Genesis has great support for child themes and other WordPress functionality. The combination of Genesis and Synthesis gives us the power and flexibility we need. Knowing my blog is well optimized, secure and easy to update lets me get on with developing content, community and building a business from my blogging. Entry Header – Genesis Framework

How to move Post Title and Post Info from Entry Header to Entry Content in Genesis

March 12, 2014 by Sridhar Katakam 3 Comments How to move Post Title and Post Info from Entry Header to Entry Content in Genesis


Staff Custom Post Type Grid in Genesis

March 2, 2014 by Sridhar Katakam 9 Comments Staff Custom Post Type Grid in Genesis

Hook Reference – Genesis Framework

Child themes and a framework are the only way you should build your WordPress site and Genesis has great support for child themes and other WordPress functionality. The combination of Genesis and Synthesis gives us the power and flexibility we need. Knowing my blog is well optimized, secure and easy to update lets me get on with developing content, community and building a business from my blogging. Hook Reference – Genesis Framework

How to Reposition Genesis Comment Form

Here’s another sweet little snippet for Genesis Framework users. If your site receives hundreds of comments per article, your readers will need to scroll down to the bottom of the page to leave their comment. To make it much easier for them to leave their comment,  you probably want to re-position the comment form from the initial position of after the comments lists to above (before) the comment list. How to Reposition Genesis Comment Form

Customizing the Genesis 2.0 HTML5 Comment Form

Now that Genesis 2.0 has been shipped, we are building all of our custom child themes with the new HTML5 markup enabled — and absolutely love the new code base. On a recent project the design specs called for a customized comment form. Adding the snippet below to your child theme’s functions.php file will remove the email privacy notice, change the comment form title, change the submit button text, and remove the HTML tags box. Via

Cris Cree did an awesome job of explaining priority in Genesis Framework hooks


How to Use Genesis Hooks to Manipulate Theme Elements

In the previous post in this series we talked about the basics of PHP and how functions are put together. Today we’re going to build on that and talk about how to use Genesis hooks to manipulate theme elements. Have you ever wondered how the Genesis theme framework knows how to call all that code from your child theme files in the right order? How to Use Genesis Hooks to Manipulate Theme Elements by Cris Cree


List of Genesis Hooks & Markup In Visual Map

Please Click Image To Enlarge List of Genesis Hooks & Markup In Visual Map

WordPress › Genesis Visual Hook Guide « WordPress Plugins

Find Genesis hooks (action and filter hooks) quick and easily by seeing their actual locations inside your theme. Via

Infinite Scroll Genesis Video Tutorials

I’ve tried implementing infinite scroll a couple times and run up against a wall.

Infinite Scroll — Jetpack for WordPress

Instead of having to click a link to get to the next set of posts, infinite scrolling pulls the next posts automatically into view when the reader approaches the bottom of the page. Unlike many of the modules in Jetpack, Infinite Scroll only works with themes that support it. Since each theme is constructed a bit differently, the Infinite Scroll module needs information about the theme to function properly. Via

I found a new tutorial however that I think will had hoped would help me get past that wall.

Integrating JetPack Infinite Scroll with Genesis

Our last couple of blog posts featured the JetPack Infinite Scroll (IS) module.  Here we show you how to integrate the code into a Genesis child theme. Our own Lime Canvas website runs on top of Genesis so you can see the IS in action on our home page. Via

As I tried it, I wanted to capture the process in a video myself. While the instructions from Limecanvas are excellent, sometimes (I think) it just helps to have a video to see the steps as well, just in case you miss a step along the way, or maybe you miss writing up a step in the blog article, sometimes the video shows what print could not.

Ran into a problem in that Jetpack didn’t want to play nice running on a local (on my computer) install. It’s supposed to be able to run infinite scroll in jetpack since it does not require a connection, but I had no luck.

I even went looking for a different tutorial in case the approach from limecanvas might have missed something.

Jetpack’s Infinite Scroll in Genesis

Update on Tuesday, February 18, 2014: Gary Jones has a released a plugin that does the same as what’s explained below. One of the many modules in Jetpack is Infinite Scroll which loads the next page of posts automatically as visitors reaches the end of posts. To get Infinite Scroll working in your Genesis theme, the first step is to activate the module in Jetpack. Jetpack’s Infinite Scroll in Genesis

That one included two video tutorials….


Have you implemented Infinite scroll in Genesis Framework Themes?

I’m curious if there are some themes from StudioPress that work fine and maybe others that do not.  There are a lot of great things about the Genesis Framework for updates and scalability and more, but it does add a layer of complexity when trying to test out some new WordPress capability that hasn’t been re-tuned for the Genesis way….

Protect WordPress from DDoS attack on Pingbacks

I came across a blog article by Cloudflare.  I use and recommend Cloudflare as a security protection and speed booster on all of my sites and all of my client sites.  Cloudflare has saved the day for myself and my clients far more times than I can count.  I came across this article on Facebook originally.

WordPress Pingback Attacks and our WAF

WordPress’ ubiquity on the web can make it an ideal target for Layer 7 attacks, and its powerful features as a blogging platform can be demanding on small web and database servers, meaning Layer 7 attacks can be effective in making a WordPress server go offline using a relatively low number of requests. Recently the guys at Sucuri observed a large DDoS using WordPress’ pingback mechanism. A pingback is a way of one website telling another that it has linked to their content. Via

Cloudflare provides an easy way for (paying) customers to stop this activity with the flip of the switch in one of their advanced settings.

I am not yet a paying customer myself.  This may in fact be one of the first compelling services I have seen to push me over the tipping point.

Regardless, Cloudflare originally heard about the problem from Sucuri, a WordPress focused security service.


More Than 162, 000 WordPress Sites Used for Distributed Denial of Service Attack

Note that XMLRPC is used for pingbacks, trackbacks, remote access via mobile devices and many other features youâ€Â™re likely very fond of. If you notice, all queries had a random value (like â€Âœ?4137049=643182â€Â³) that bypassed their cache and force a full page reload every single time. Yes, other WordPress sites were sending that random requests at a very large scale and bringing the site down. Via

Sucuri zeroed in on this type of attack after a WordPress site was knocked out by a DDoS attack and they signed up as a new Sucuri client.

I’m not a Sucuri client myself, but they do some very good work.  Between Cloudflare, ManageWP and my own experience with WordPress I currently feel that I’m safe enough.  If I were to turn to someone for a boost, Sucuri would be top of my list.

Anyway, they spotted the bad behavior and they also have a solution for their paying clients to protect people. They also setup a free tool, such that you could determine if your own WordPress website was being utilized to attack others (as opposed to the protection these provide against being the WordPress site attacked.)

They also offered two solutions for stopping your WordPress website from being used to attack others.  The third one below is my suggestion.

  1. Turn off / disable notifications in your WordPress admin settings
  2. Add the following code to your functions.php file (not for novices)

add_filter( ‘xmlrpc_methods’, function( $methods ) {
unset( $methods[''] );
return $methods;
} );

I would add this third tip…

3. Become a client of Sucuri and/or Cloudflare  :)

Catching up with Advanced Custom Fields (ACF)

This month I’ve been catching up with an old friend of mine, Advanced Custom Fields.  This is a free WordPress plugin and tool that I do not use regularly.  Most projects I work on do not require the creation of custom fields.  Custom Post types (not to be confused with custom fields) further reduces my need to use custom fields.


When a site or section of a site needs the ability to collect unique information in fields and display them in ways that is outside the scope of a theme or even a plugin, this is where ACF comes in and can save the day and enable some very advanced capabilities.

As I was refreshing my own memory on how ACF works, I came across a decent 3 part tutorial that shows them used in conjunction with Custom Post Types UI plugin as well.  This tutorial series is from a slightly older version of the plugin, but it is pretty solid.  At the bottom of this post is a fourth video that shows some of the latest cool stuff from ACF (version 4.x era).  Version 5 of ACF will be coming out soon as well.

Custom Post Types UI and Advanced Custom Fields Part 1

Custom Post Types UI and Advanced Custom Fields Part 2

Custom Post Types UI and Advanced Custom Fields Part 3

ACF { ACF v4.3.0 released

After a long awaited arrival, the all new ACF v4.3.0 is out and available for download! To co-inside with this release, you will also find updates for both the repeater and flexible content field add-ons. This release includes some powerful functionality for sub field conditional logic, which I have showcased in a demo below. Via


Optimized WordPress Managed Hosting Comes to More Traditional Hosts

Following on the heels (and success) of companies like Pressable and WPEngine who offer Managed WordPress Hosting services that we use and recommend ourselves.  Two more traditional hosting companies are moving to help WordPress users optimize and speedup their WordPress experiences through Managed WordPress Hosting.  This is a premium hosting service generally targeted at 1-5 sites at a time typically and for a monthly fee that is definitely a premium compared to generic hosting services.  The benefit comes in the speed, reliability, backups, optimization of page load times and the reduced hassle from having to track down CPU hogging plug in or theme issues.

It’s no surprise that more traditional hosting companies are starting to do this.  Their delay and the delay of their competitors is the actual surprise.  Generic hosts have been slow to answer the growing number of complaints from their users as WordPress grows in popularity but the server configurations and support for WordPress optimization lags.

I expect many more traditional, generic hosting companies will step to the plate this year.

GoDaddy Expands WordPress Offerings With Managed Hosting

(January 16, 2014) – GoDaddy, the world’s largest Web hosting provider, is launching a new Web hosting platform dedicated to optimizing WordPress, the most popular content-management system. Live tomorrow, the new WordPress experience enables customers to focus on content creation, while GoDaddy handles the technical details of managing a Web hosting account including server set up, security, daily backups and performance optimization. GoDaddy Managed WordPress automatically updates accounts to the latest version of WordPress and ensures that a website’s plug-ins aren’t vulnerable to security attacks or wasting resources, causing a website to perform poorly. GoDaddy Expands WordPress Offerings With Managed Hosting

Media Temple Launches Managed WordPress Hosting Service

Love it or hate it, but there’s no denying that WordPress continues to be the de facto solution for building content-driven websites. The company is pricing its hosting solution at a very competitive $29/month for up to three WordPress installs. There are no bandwidth limits at this rate and users should be able to handle millions of pageviews per month at this price. Via


Taking the Scare out of Automatic Updates-WordPress 3.7.X

WordPress sites have grown increased in numbers rapidly, yet too many people set them up and don’t update them.  They miss the chance to fix security weaknesses through updates to WordPress, WordPress Plugins and WordPress themes.

Enter the Solution

Automatic Updates of WordPress, WordPress Plugins and Themes

Now it wasn’t difficult to update these things before.  For the most part, you could backup your site, and then simply push a button to install an update on your site in no time.

But that was really too hard.  It required logging in, running a backup, and then pushing a button.  Depending on your hosting situation and your backup situation, that could require a dozen clicks or so.  Like I said, too much work, for most people.

So WordPress open source developers came up with the idea and then implemented Automatic updates with WordPress 3.7 Basie.  Whenever there is an update available for WordPress, or updates available for Plugins or themes on your site, WordPress runs a check twice a day (at 7am and 7pm, I don’t know what time zone that isbased on the time zone chosen in your own WordPress General Settings.)

If WordPress finds an available update, it downloads, unpacks, temporarily puts your site in maintenance mode, installs the update and then takes your site out of maintenance mode.

That’s it, its done.  You probably don’t even know it happened.

Well, That Scares the Crap out of a lot of People!

Automatic Updates sound great, but what if something goes wrong?

If you have customized a theme or a plugin, the automatic update might wipe out your changes.

Yes, it may not be wise to customize such things, but if you did it despite the advice other people might have provided….

So I wanted to know for myself and for two clients that have a unique considertation

How do you manage or stop WordPress from updating EVERYTHING ALL THE TIME?

Now initially, I found a couple articles that talked about altering the WP Config file.  This is something many of us do on a regular basis, and have done so for years.  However, as WordPress has matured, it has become less necessary.  It seemed like a bit of a step backwards to force someone to crank open an ftp program, download the wp-config file and edit it with tips like this:

In fact, I read so many like that, well it seemed a bit redundant.  I have no idea who the original source was (the first article)

Please don’t misunderstand, those are good tips.  This is probably the best way to do it, but sometimes mortals will look for an easier way….

So like anyone that has used WordPress (or an iphone) for more then 5 minutes I looked for plugins (not a good way really and I don’t recommend any of them although the last one seems promising to me…)

  1. Update Control
  2. Disable Automatic Updates
  3. Advanced Automatic Updates - Also mentioned here a lot

Those all seemed nice, but they all lacked screenshots, and once I looked at them, didn’t really offer the level of control I was looking for.

In particular, I wanted something that could let me pick and choose the plugin updates or theme updates I wanted to run automatically.  I didn’t see it in the WordPress repository, but

I have a ManageWP account!  (salesy pitch – ManageWP lets someone manage multiple WordPress installations.  They also let you (before automatic update) remotely backup and update many WordPress sites at the same time.

Well, they must have been working overtime to keep their edge because they sent me this cool email (Their newsletter isn’t that cool, but this one was timely.  It was titled ‘Weekly Update’ and I almost deleted it!)

I had to click through a couple links in the newsletter to strike gold and find on a post

ManageWP introduces the ability to use the same Automatic Background Updates mechanism built into the WordPress core and apply it to plugins and themes on a per-site (or all sites at once through our powerful Manage Plugins & Themes interface) basis. We have built this integration to compliment and further extend the WordPress Automatic Background Updates feature.

Stop Automatic WordPress updates individual plugins ManageWP


Isn’t that picture cool?

That was perfect.  I could toggle stuff on and off one plugin at a time.

I mentioned I have a couple clients with a unique situation.  They have an html5 audio player plugin.  It had a version 2.9 that worked perfect!  I say PERFECT!  Then the plugin developer went and started adding stuff to it, and as far as I know, it the newer versions haven’t worked right since.

So for these two clients, the audio player is essential to their business and they are on strict orders, punishable with a wet noodle lashing, to never ever ever update that plugin, until we’ve had a chance to do a day or two of testing (I don’t charge for this stuff) and make sure it will work for them.

but how can they update to WordPress 3.7 if the plugin will update in the background?

Well, with ManageWP’s solution (part of a paid service) we can handle it.  (I have a service plan for them.)

Free Method

Don’t get me wrong, using Advanced Automatic Updates you can turn off the background (automatic) updates for ALL plugins.  So if you don’t want to pay for ManageWP, I understand.  I need and use it for other things.  This was just a nice extra for me on something I was already paying for.

 Oh Hey, I almost forgot, yet another way to manage Automatic Updates – Managed WordPress Hosting

I also have hosting through WPEngine on a few sites.  They also offer a unique solution.  (They are not cheap, but they are good.)

If you utilize their Managed WordPess Hosting (that’s all they offer), they have a process where they run a test on your site to see what it looks like before an automatic update.  They then run the update and compare the site afterwards to make sure it looks the same.  If it does, they leave the update in.

If it looks substantially different or broken or lights up the error log, they roll your site back and let you know.  They do all that without you having to be there.  Great service given the circumstances, plus they are super fast.  If you need fast, and good service like that, and don’t mind their expense (starts at $29 / month), this is another way to get some great results.  (They also offer a strong affiliate program. I recommend both.)


Inserting Ads Mid Post in Genesis with Simple Ads Manager

This weekend I was having some difficulty inserting ads within the middle of a post using the plugin  Simple Ads Manager.  In retrospect (cutting to the chase a bit) there seems to be a setting within the Ads place setting that has the power of turning this on or off.  I’ve stumbled on it by accident twice, but not able to replicate the process when I need it.

I like the plugin for managing ads in other areas of a WordPress install, just fine.  Its the insertion within a post (ergo maybe 3-5 paragraphs down or something) where it gave me trouble.

So I tried to tackle things in a semi old school way.  A quick Google search put me on the refresher course for inserting ads, in this example Adsense ads in a post.  An article titled Adding Adsense within the Post Content – WordPress & Genesis helped quite a bit, however, I definitely did not want to follow this method on my own site.

In my case I am running a StudioPress Child theme and Genesis Framework.  The code in that example provides for the creation of essentially a ‘plugin’ but one in the theme file, ergo something that hooks into the theme and alters the output.

I was already running Simple Hooks for Genesis Framework so it did not make sense to create a file to do that all over again.  I just needed to find the Simple Hooks way of achieving the same result.

But I didn’t want to insert raw code, I wanted to call ads managed by the plugin Simple Ads.  I don’t want someone working for me to have to go alter code that might potentially break the theme everytime they need to put a new ad in to rotation!

So I first went into Simple Hooks, navigated down to the Post/Page Hooks section  and added the following code to the genesis_post_content Hook:

$paragraphAfter= 4; // Insert Ad after 4 paragraphs
$ad = '

[sam id=5 codes='true']

$content = apply_filters('the_content', get_the_content());
$content = explode("

", $content);
for ($i = 0; $i <count($content); $i++ ) {
if ($i == $paragraphAfter)
echo $ad;
echo $content[$i] . "


Here’s the image if that code insert is broken

I also checked the box – Unhook genesis_do_post_content() function from this hook?
and then checked the box to allow both shortcodes and php to execute on this item as well.

the short code within the php above is from the Simple Ads Manager (SAM) and it is calling the 5th ads place set of ads that rotate and telling it to display here.

I seperately created a div and class to style the ads such that they would float right with some amount of padding in the content. I later added some css to a custom style sheet to achieve the result I was looking for: .adsensefloat {
float: right; padding: 30px;}

I’m still testing to understand the unintended consequences within Simple Ads Manager, but it seems to stem from a check box option in the Ads Places setup after you select html and then see a check box for “This is one-block code of third-party AdServer rotator. Selecting this checkbox prevents displaying contained ads. This is a HTML-code patch of advertising space. For example: use the code to display AdSense advertisement.”

This seems to sometimes turn on the insertion of ads within the content, but not always…

If you’ve had experience with this, I’d love to compare notes!