Secure WordPress login page with Cloudflare

Cloudflare is a great way to protect and speed up your WordPress website.  I use their services as well for many years now and I’m very satisfied with their offerings. Here is a small (but possibly very important!) tip to maximise the security of your WordPress login page if you use Cloudflare as your DNS … 

 

Hide all WordPress update notifications in dashboard

WordPress has a build-in upgrade system. This system automatically informs you when there is an upgrade available for WordPress, or one of the themes or plugins that are installed on your WordPress installation. To disable this update notification, there is no switch in the settings menu or anywhere else in the admin dashboard. To prevent … 

 

Syntaxhighlighter Evolved: change scripts to CDN

I try to maximise my efforts when it comes to page load times. As such, I’m a big fan and user of CloudFlare because it greatly reduced the loading times of my webpages. For the Syntaxhighlighter Evolved WordPress plug-in, I wanted to switch the scripts needed to CDNJS, the CloudFlare CDN for scripts and other static … 

 

WordPress: If homepage or index.php

To display content in WordPress only on the homepage (example.com) or on the index page (index.php), use the following code snippet: WordPress: If homepage or index.php was last modified: December 25th, 2015 by Thomas

 

Enable AMP HTML on your website

AMP HTML is an initiative from Google to speed up page load times drastically. The idea is to only load the essential content of that page, while leaving the Javascript and other non-essential elements behind. AMP stands for Accelerated Mobile Pages. Google, on their official blog, themselves say the following about this project: We hope … 

 

Remove the favicon feature in WordPress

Via the customizer, recent versions of WordPress allow you to add a favicon to your site automatically. The feature generates a favicon in the right sizes and inserts them in the <head> of your HTML code. It’s an ideal way to have a valid image for your favicon and mobile devices. However, when I was … 

 

Fix Image Upload “HTTP Error” on WordPress

When uploading an image on my WordPress blog, I received a general error that said HTTP error. As a result, the image upload failed. Luckily, I quickly found a fix. I recently upgraded my PHP version because of the speed improvement and the security patches. So I first tried looking for a permission mismatch somewhere, … 

 

Visual Editor not showing up on WordPress

When creating or editing a WordPress post or page, a user has the option to choose the visual editor (using TinyMCE) or text (the source code). One of my websites, with a clean WordPress installation and no plugins, decided to not show the visual editor buttons. So, I could only use the text editor. There … 

 

Hide “Customize” menu option in WordPress

With the WordPress 4.3 release, the WordPress.org development team made some visual changes to this great CMS. One of them is the addition of a Customize option in the top admin bar, right next to your site’s name. Customize link added in the toolbar to swiftly make changes to your site. It’s great if you frequently make … 

 

Syntaxhighlighter Evolved: add horizontal scrollbar

Plugin name: Syntaxhighlighter Evolved This is a great plugin to show code on your WordPress blog. It supports many languages and is easy to use and modify. However, if a line of code is too long, it will go to the next line instead of adding a horizontal scrollbar. The current situation is not pretty … 

 

Google Search Console – “Missing: Updated” WordPress fix

In Google Search Console under Search Appearance > Structured Data, I found many errors for my WordPress website. The errors were all the same, Missing: Updated. This means that for each WordPress blogpost or article, that page did not have the updated microdata. So to resolve this error message, I had to add the missing updated field … 

 

Show the number of comments per post in WordPress

A WordPress blog post can have no, one or multiple comments associated with it. To display the number of comments one post has, include this within the post loop, for example in content.php: This will create a variable name totalcomment and it will store the number of comments for that specific blog post. Then, you … 

 

Add language attribute per post in WordPress

There are numerous ways to create a multilingual WordPress website. However, there is not much information to be found if you just want to have WordPress website in one language, while only writing specific blog posts in another language. For example: your mother tongue is Dutch. To gain an international audience for your website, the … 

 

Remove Emoji javascript file in WordPress

WordPress supports emoji’s, these smiling faces, cats, dogs, planes, … and for your WordPress website to properly display them, a bit of extra code is added. If you wish to disable emoji support on your own WordPress blog, you want to remove this javascript file: /wp-includes/js/wp-emoji-release.min.js which dynamically loads these two files: /wp-includes/js/twemoji.js /wp-includes/js/wp-emoji.js Personally, … 

 

Fix a blank WordPress website

There was a friend of mine who got in touch with me about his WordPress website installation. He got a white screen when opening his website, on all of his pages, even the login page. There was no way to access the dashboard. To fix this issue, I first checked the root of the installation … 

 

Force HTTPS on the WordPress login page

To force HTTPS connection on the wp-admin directory, edit your wp-config.php file and add   This will ensure the admin area is always loaded with SSL, ultimately resulting in a safer WordPress installation. Force HTTPS on the WordPress login page was last modified: April 12th, 2015 by Thomas

 

Add a canonical tag to WordPress header.php

Adding the canonical tag to your WordPress blog might be essential if you do not want search engines to see your content twice (= duplicate content) and thus giving you a penalty as such. To add this tag, simply go to your theme’s folder and find header.php. Now, add the following somewhere after <head> but … 

 

WordPress: Only show something on non-homepage

This piece of code can be used in your WordPress templates in order to show a piece of text or code on all pages expect for the homepage. If you want to make a button that points back to the homepage, for example, than you can use this code as it makes no sense to … 

 

Change default uploads folder in WordPress

To change the default folder where uploads are stored on your webserver when using WordPress as your CMS, open wp-config.php and add the following line of code: In this case, the folder where uploads are stored is called ‘uploads’ and can be found at example.org/uploads/ and are then, based on your settings, saved in a …