Generating Random Featured Images In WordPress

setting a random featured image

Most WordPress sites rely heavily on setting a featured image. These are typically displayed at the top of the post itself. And are also used in navigational areas such as category pages.

Depending on the theme you are using or the plugins installed, featured images may also appear in image sliders or lists of related posts.

In short, unless your blog is deliberately very text based, featured images are important. Continue reading “Generating Random Featured Images In WordPress”

How To Remove Google Fonts From The Twenty Sixteen WordPress Theme

remove Google Fonts from Twenty Sixteen

Short and sweet – you don’t want your custom Twenty Sixteen theme using bloated old Google Fonts?

Simply add this function to the functions.php of your child theme.

function twentysixteen_fonts_url() {
   $fonts_url = '';
   return $fonts_url;

Don’t wrap it in an if ( ! function_exists( ‘twentysixteen_fonts_url’ ) ) because you’re overriding the function from the main theme. It does exist, and you want to override it. Continue reading “How To Remove Google Fonts From The Twenty Sixteen WordPress Theme”

YARPP: How To Exclude Posts Or Categories

YARPPThe related posts plugin ‘YARPP’ from Mitcho is a fine piece of work, and worth supporting.

But as with many WordPress plugins, sooner or later you come across something you need to do with it that the author hasn’t considered yet, or had time to add, or been nagged enough to provide 😉

And so we found ourselves on a project wanting to exclude certain posts from displaying any related posts. Continue reading “YARPP: How To Exclude Posts Or Categories”

Your Apache htaccess ‘Order Deny, Allow’ Not Working?

It’s very easy to make mistakes with the htaccess Order directive, so if it’s not working here’s some tips to fix it (for Apache web servers).

If we get the ‘Deny, Allow’ bit the wrong way round it won’t do what we expect – at best it will do nothing, at worst it denies everybody access to our site. So tread carefully, keep a backup and test after making changes 🙂

IMPORTANT: Also see below as the order directive has been deprecated and there is a newer way to do this.

‘Order’ in htaccess does not work like other kinds of regular expressions (regex).

Key Point 1: Apache always makes THREE passes of the access statements. Continue reading “Your Apache htaccess ‘Order Deny, Allow’ Not Working?”

Convert Your Blog RSS Feed to an Email Newsletter

Let’s face it, RSS feeds are not read by ‘normal’ people.

Real, non-techie people haven’t a clue what RSS is, or how to use Google Reader.

That’s OK if your blog is about geek or tech subjects. But if you’re trying to get regular readers for a site about cross stitch, don’t expect RSS readers to hit even the double figures if all you have is a feed button on your blog.

Normal people read emails.

So here’s two easy ways to get your blog RSS feed automatically converted into an email newsletter format. Continue reading “Convert Your Blog RSS Feed to an Email Newsletter”

How to Add a Photo to a WordPress Profile

Adding a profile picture to WordPress is much easier than you might think.

But it also doesn’t work in anything like the way WordPress normally handles graphics, so confusion is OK.

So Why Add a Profile Picture to WordPress?

Three very good reasons.

add wordpress profile photoFirstly, in many WordPress themes the profile pic will automatically appear on your author page. I’m talking self-hosted WordPress here, but if you’re using this will also apply if you’re using the author widget.

Secondly, that same photo will appear next to all comments you make on your blog (you know, when you reply to other people who add a comment). Again, depending on theme, but most themes do this.

Thirdly, your WordPress profile photo will also show whenever you comment on other blogs too! Continue reading “How to Add a Photo to a WordPress Profile”

What IS The Hello Dolly WordPress Plugin About?

hello dolly pluginIf you’ve ever installed a WordPress plugin, you’ve seen ‘Hello Dolly’!

What the heck is it doing there? Just what does it do?

And more to the point, why does it sometimes insist on installing itself again every time you upgrade WordPress.

The Hello Dolly plugin has been included with WordPress since the very early days. And it’s still included even now in the latest version.

But why? Continue reading “What IS The Hello Dolly WordPress Plugin About?”

WP-Cache Error & WordPress Login Error?

Are you seeing this error message at the top of every page of your WordPress blog? (The fix is below…)

Warning: sem_get() [function.sem-get]: failed for key 0x152b: Permission denied in /home/username/public_html/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 98

You might also be getting something like this at the foot of every page too:-

Warning: sem_acquire(): supplied argument is not a valid SysV semaphore resource in /home/username/public_html/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 107

You’re not the only one. Google is full of sites showing this error (about 50,000 pages on this quick search):-

If you’re seeing this error, you probably can’t log in to the admin area of your blog either! Here’s how to fix it. Continue reading “WP-Cache Error & WordPress Login Error?”