Anti-Spam Solutions for WordPress

Anti-Spam Solutions for WordPress

Are you fighting a losing battle against spam on your blog or website? Read on to find which plugins will provide a solution to ending spam once and for all.

Continue reading

Custom Database Error Page

Custom Database Error Page

Put a file called “db-error.php” directly inside your /wp-content/ folder and WordPress will automatically use that when there is a database connection problem.

Continue reading

How To Remove Media Upload Buttons in Post Editor

How To Remove Media Upload Buttons in Post Editor

In the WordPress admin screen, when working in the post or page editor, you will see some media upload buttons above the TinyMCE editor. If you would like to hide them from your client, for example to disable the upload of such files, you can follow the steps in this post.

Continue reading

Using Featured Images in Custom Post Types

Using Featured Images in Custom Post Types

Custom Post Types are one of my favourite features in WordPress nowadays, and I use the excellent Easy Content Types plugin for generating them. Sometimes I need to include uploadable images within the the custom post types, and although the plugin mentioned allows file uploads, I still feel that some tweaking of the ‘Featured Image’ functionality provided by WordPress is still the most ideal method of doing this. So at the end of this tutorial we will have something that looks like the screen below This is a screenshot of the ‘Books’ custom post type I have running on this…

Continue reading

Best Banner Image Plugin for WordPress

Best Banner Image Plugin for WordPress

WP Bannerize is an amazing Banner Image Manager. In your template insert: , use new shortcode featured or set it like Widget.

Continue reading

WordPress Archive Solutions

WordPress Archive Solutions

WordPress provides the handy wp_get_archives() function for displaying post archives in your site, however depending on your site or blog, you may want to have some more advanced functionality. Let’s take a look at the options out there.

Continue reading

Best Pagination Plugin for WordPress

Best Pagination Plugin for WordPress

Pagination is an in-built feature of WordPress, but the default functionality only includes a way to access the next post or the previous post. A blog can have hundreds or thousands of posts, so this functionality might turn out to be a bit limited for such power users. A better technique would be to have numbering at the bottom of the post, whereby you would be able to skip easily to other posts, similar to the Google search page results screen. The best pagination plugins for WordPress are WP PageNavi and WP Paginate. WP PageNavi WP PageNavi is the most…

Continue reading

Best Sharing Plugins for WordPress

Best Sharing Plugins for WordPress

When blogging it is essential to let your readers easily share the content you are producing. With social sharing icons you will thus be aiding your users. In this post we examine some of the most popular options for WordPress.

Continue reading

Extract All Image Sources from a WordPress Post

Extract All Image Sources from a WordPress Post

Here’s a handy piece of code that extracts all the images from a WordPress post: [php] global $post; if ( preg_match_all(‘/<img (.+?)>/’, $post->post_content, $matches) ) { foreach ($matches[1] as $match) { foreach ( wp_kses_hair($match, array(‘http’)) as $attr) $img[$attr[‘name’]] = $attr[‘value’]; echo $img[‘src’]; } } [/php] The resulting output will be in this form: [php] Array ( [src] => test.jpg [class] => testclass another [id] => testid [fake] => ) [/php] About Jean GaleaJean Galea is a WordPress developer, entrepreneur and padel player. He is the founder of WP Mayor, the plugins WP RSS Aggregator and EDD Bookings, as well as…

Continue reading

How to Check if Category is a Subcategory

How to Check if Category is a Subcategory

This is a useful function I use for building conditional statements to check whether a category is a subcategory (.e. has a parent).

Continue reading