Theres more

Shortcodes are a very interesting and powerful WordPress function that can, for example, be used to display Google Adsense ads anywhere on your blog posts and pages. If you have read the first recipe of this chapter, you are probably thinking, 'What about pasting this WordPress shortcode directly in a sidebar widget?'

Inserting shortcodes into sidebar widgets

Using a custom WordPress shortcode to display your Adsense ads code is a lot quicker, and simpler, than pasting the whole code provided by Google. But sadly, by default, shortcodes can't be inserted into text widgets.

To change this, simply edit your functions.php file and paste the following code:

add_filter('widget_text', 'do_shortcode'); Now, you can insert WordPress shortcodes into sidebar widgets.

The Adsense Blueprint

The Adsense Blueprint

Experienced Adsense Veteran Takes Newbies by the Hand. Easily Build a Profit-Pulling Adsense Website in as Little as a Week even if you have no experience. Get Your Business Going in as Little as a Week.

Get My Free Ebook


Post a comment