Posts Categorised: Wordpress

5Wordpress LogoAdsense ads above the last paragraph of a post

You may have noticed that we’ve tweaked how we dis­play our adsense ads.  We wanted some small text-only ads near the bot­tom of each art­icle, which would be added auto­mat­ic­ally.  This took a little bit of tinker­ing, but even­tu­ally we developed a solu­tion which works well and does­n’t seem to knock page pro­cessing times much.  Simply add the fol­low­ing code to your theme’s functions.php (don’t for­get to change your adsense IDs) … Read Full Article

0Comment bubbleEasily set the parent of a WordPress comment

As is doc­u­mented in the site update log, for a while we had a prob­lem with our theme where it was­n’t pos­sible to reply to a com­ment so that the reply would appear cor­rectly in a threaded way.  We have no fixed this prob­lem, but have been left with a sig­ni­fic­ant num­ber of com­ments which really need edit­ing so it is easi­er to see what they are in reply to.  With a stand­ard word­press install this requires going into the data­base and edit­ing there, which is very tedi­ous.  Instead, we’ve used some simple func­tions to add an option to the com­ment-edit admin page, to set the com­ment par­ent there.  Even­tu­ally this will be developed into a prop­er plu­gin to enable this func­tion­al­ity.  For now the code is below, just add it to your theme’s functions.php

Read Full Article

1Comment bubbleJetpack-style comments without Jetpack

One of the best things about word­press is the built-in social aspect provided by com­ments.  Get­ting your com­ment sec­tion right can be very import­ant to any web­site, includ­ing ours.  Over the years we’ve exper­i­mented with vari­ous com­ment plu­gins includ­ing Dis­qus and more recently Jet­pack.  How­ever, we’ve always ended up bring things back in house for man­age­ment, per­form­ance and pri­vacy reas­ons.  When I moved back from Jet­pack com­ments I really missed some of the slick fea­tures provided by Jet­pack, both the social-net­work logins and the gen­er­al slick styl­ing.  Any­way, to cut a long story short I finally had time today to take a good look at how word­press “does” com­ments and fig­ure out a way to build an in-house sys­tem which looks nice and slick like the com­ment inter­face provided by jet­pack.  Best of all its sur­pris­ingly simple and does things the “prop­er” way…
Read Full Article

9Wordpress LogoRich Snippets code for the Twenty Eleven theme

I’ve pre­vi­ously detailed the code for enabling rich snip­pets in vari­ous word­press themes ([int­link id=“2948” type=“post”]Mystique 2[/intlink], [int­link id=“2949” type=“post”]Mystique 3[/intlink], [int­link id=“2468” type=“post”]Thesis[/intlink] & [int­link id=“3017” type=“post”]Me Gusta[/intlink]) as well as some [int­link id=“1520” type=“post”]generic instructions[/intlink]. Below is a set of edits to enable rich snip­pets in the built-in word­press twenty elev­en theme.

Read Full Article

0Wordpress LogoRich snippets code for Me Gusta theme

I’ve pre­vi­ously covered theme edits for rich snip­pets for vari­ous themes includ­ing [int­link id=“2948” type=“post”]Mystique 2[/intlink], [int­link id=“2949” type=“post”]Mystique 3[/intlink], [int­link id=“2468” type=“post”]Thesis[/intlink] & [int­link id=“3015” type=“post”]Twenty Eleven[/intlink] as well as some [int­link id=“1520” type=“post”]generic instructions[/intlink].  Below are details of the code for how to val­id­ate rich snip­pets in the Me Gusta by Cos­mos theme.

Read Full Article

2Wordpress LogoRich snippets code for Mystique 3.x

I’ve pre­vi­ously writ­ten about rich snip­pets code for [int­link id=“2948” type=“post”]Mystique 2[/intlink].  There are also [int­link id=“1520” type=“post”]generic instructions[/intlink] and code for the themes [int­link id=“3015” type=“post”]twenty eleven[/intlink], [int­link id=“3017” type=“post”]me gusta[/intlink] and [int­link id=“2468” type=“post”]thesis[/intlink].  Below is updated code for Mys­tique 3

Read Full Article

0Wordpress LogoRich Snippets code for Mystique 2.x

In addi­tion to this site I have a per­son­al blog where, amongst oth­er things, I post recipes. I’ve recently dis­covered google’s new recipe search, and have been look­ing to imple­ment sup­port for micro­formats / microdata. Google provide a tool for check­ing your markup, called the “rich snip­pets test­ing tool”. When I tried val­id­at­ing one of my recipes, I encountered vari­ous errors, which have taken me a while to track down and resolve. … Read Full Article

0Wordpress LogoFixed: Deprecated PHP errors in wordpress dashboard

Earli­er today I updated our test site, in pre­par­a­tion for rolling updates out to the main site.  This involved updat­ing sev­er­al plu­gins and repla­cing the “BeforeTheDead­line” plu­gin with Jet­pack.  After com­plet­ing the updates I found I was get­ting sev­er­al error mes­sages on the dash­board, under the “incom­ing links” dash­board wid­get, and even more errors when I tried to empty the W3 Total Cache caches.

Read Full Article

22Wordpress LogoRich Snippets Code for Thesis Theme

In response to a query by Darko Kovan­cives on my pre­vi­ous art­icle about [int­link id=“1520” type=“post”]fixing Rich Snip­pets code for the Mys­tique theme[/intlink] we have resolved the same issues with the Thes­is theme.  Details of the changes required are below.… Read Full Article

0Wordpress LogoMystique 3 Theme: Full-post and Excerpts

I’ve been try­ing to fig­ure out how to dis­play full posts on the home page, and excerpts on all archives for about 3 days.  This is nice because it means a decent amount of each post is shown on the front page, whilst archive pages con­tain a much more con­cise sum­mary of each post.  This is bet­ter both for humans, and also for SEO — my archive pages now don’t have duplic­ate con­tent from my home page!

I’ve finally pro­duced a solu­tion.  It’s not espe­cially eleg­ant, but I’ve been at the very lim­it of my PHP know­ledge just to achieve this meth­od.  This applies spe­cific­ally to the Mys­tique 3 theme, oth­er themes are likely to vary, although some of this inform­a­tion may or may not prove rel­ev­ant.  If you are try­ing or suc­ceed in doing the same to a dif­fer­ent theme do drop a com­ment in.… Read Full Article