17 valuable WordPress snippets for a site-specific plugin and
functions.php that give you a better WordPress experience. Enhance your WordPress site with these small PHP snippets: WordPress filters, actions and functions. Quickly add or extend the functionality you need for your WordPress website! Read on…
Continue reading “17 Valuable WordPress snippets you never knew you could live without”
In my WordPress multisite, I use one theme for three sites and a tracking code for analytics on my websites. Whether it is Google Analytics or Piwik doesn’t matter, here is how you can conditionally add tracking codes to your WordPress Multisite: Use a condition in
functions.php to add the tracking code for Piwik Analytics or Google Analytics.
Continue reading “Conditional analytics tracking code in WordPress multisite”
It is important to protect your WordPress website from brute-force attacks, and various security plugins exist in doing so. For the purpose of this article, I modified the WordPress Login Delay plugin with a fixed delay of three seconds for my
wp-login.php page. This provides you with an easy to use method of protecting your WordPress login form (but do read the caveats!).
Continue reading “Add a delay to your WordPress login form”
Enable HTTP Strict-Transport-Security (HSTS) in IIS. Scott Hanselman wrote a great post on how to enable HTTP Strict-Transport-Security (HSTS) on IIS web servers, and here is some more technical information about HSTS in IIS (and other security headers)…
Continue reading “How to enable HTTP Strict-Transport-Security (HSTS) on IIS”
How to display WordPress tags with commas in them? Normally, in a WordPress post all tags are comma seperated: php, wordpress, functions.php. But what if you want to use a tag with commas in it? For instance cafe, bar, restaurants. Easy, create a filter in your WordPress
functions.php, here is how.
Continue reading “Display commas in WordPress tags”
How to change WordPress’ stylesheet URL with
add_filter(). Just a quicky: To change the stylesheet URL in WordPress, to offload static content, put the following in your theme’s functions.php file:
Continue reading “Change WordPress stylesheet_uri with add_filter()”
If you run a WordPress blog where you display (parts of) source code, syntax highlighting is a must! It prettifies the code which makes it easier to read and it distinguishes code from text. However, most syntax highlighting is made available through plugins, and we all know too many plugins bring a lot of overhead to your blog.
Continue reading “Load google-code-prettify syntax highlighting without plugins”