Skip to main content

Install & Enable AMP Auto Ads by AdSense Labs in Worpdress – How To

If you’re a Google AdSense user you will probably know about AdSense Lab, the incubator hosting those brand-new Ad-based features that aren’t yet ready to be rolled out to all AdSense publishers. The new deal these weeks is called AMP Auto Ads, a new family of advertising units that will be placed automatically within the AMP pages of our website/blog.

In the unlikely event you dont’ know what an AMP page is or if you never heard about the AMP Project, we strongly suggest to fill this huge SEO & accessibility gap by taking a look at the AMP Project’s official page.

The AMP Auto Ads feature is currently in beta and thus accessible only for those who are explicitly invited via e-mail from AdSense Lab. For additional info, read this official guide from Google AdSense. However, since you are here, there’s an high chance you already know everything about AMP Auto Ads and you’re looking for further info about how to properly implement them on your WordPress website or blog.

Read More

WordPress – How to perform Search and Replace on whole Database (post, pages, wp_options) using WP plugins or MySQL tools

Those who are frequently working with Worpress often find themselves operating mass-replace tasks throughout the whole WP Database. Such situation most likely arises in the following scenarios:

  • WebSite URL change (from  www.url-a.com to www.url-b.com), meaning we have to replace the old one in all of our posts/pages.
  • Invalid character issues (mostly due to charset)
  • Having to rename one or more keywords, tags, categories or more (for standard URL & links consistency).
  • Presence of a typo within multiple posts, which you would like to fix without performing thousands of edits.

When we need something like that, we can choose between two possible routes: going for a WordPress plugin to handle such issue in a managed way or work at database level with the help of some free and/or open MySQL management tools.

Read More

WordPress – How to retrieve all posts from one or more given categories with a SQL query

Today a client asked me to remove all the posts from a given category to the auto-generated XML Sitemap of his WordPress blog and also redirect these posts to a new website (same slug, different host): here’s a quick report of how I managed to do that, hoping that it would also help other System Administration that will be given these same tasks.

Read More

WordPress – How to redirect all posts in one or more Categories, having one or more Tags or other custom conditions

Being able to redirect a post to another URL is a common need of any WordPress-based Web Master: there are a number of good reasons for doing that, such as: splitting your blog, moving a post from a website to another or to a sub-domain, and so on. Luckily enough, there are a lot of good plugins that can help you to do that, such as:

… and so on.

Unfortunately, most of them are either working with an SourceURL > RedirectURL static list or by adding a widget in the Edit Post page where you can insert the target redirect URL and some additional parameters, such as the redirect type (301 or 302).

What if we need to redirect all posts matching a certain condition? Here are some examples:

Read More

How to fix the “No rules defined for… in the context of InstantArticle” errors in Facebook Instant Articles WordPress Plugin

If you stumbled upon this post, you most likely know what Facebook Istant Articles are and how to properly implement them in your WordPress blog. In the unlikely case you don’t, we strongly suggest to visit this page first, read the informative stuff, follow the Sign up link to enable the feature on your Facebook page, then install this WP plugin and configure it.

If you already did this and you ended up here, chances are that you’re facing a warning similar to the following one:

This post will not be submitted to Instant Articles because the transformation raised some warnings.

This post was transformed into an Instant Article with some warnings:

No rules defined for <div class=”shareaholic-canvas”> in the context of InstantArticle

The warning gets raised near the bottom of the Edit Post page within the WP-Admin interface, just like the screenshot below:

Read More

Close