WordPress plugin – Create an explore topics page for your site/blog

Tags can be used quite effectively to show various topics you have covered on your site/blog. Here is a plugin which lets you create an alphabetical listing of tags with search as you type filter as shown below This plugin automatically lays all your tags in alphabetical order on a page and adds an ajax filter input box which allows to search as you type for a particular topic/tag. Download the plugin from Wordpress Plugin Repository Features Search for topics as you type, Supports Multisite, Show your users the vast range of topics covered on your site, Help in visitor retention and reduce Bounce Rate, Simple and easy to configure  ...
Read More

WordPress Plugin – Allows to selectively dequeue scripts/styles on each post

The plugin allows to dequeue or remove a script/style on a per post basis. It helps to improve performance of the site and you can make sure that atleast your important pages are optimised. Download the plugin from Wordpress Plugins Repository The plugin is very simple. All you need to do is to edit a post which you wish to optimise and on the WPI Enqueue Manager meta box add the handles of the scripts or styles in bar (|) separated format to dequeue it from that post. Detailed instructions on how to use this plugin Install and activate the plugin Upon activation, the plugin will show all the handles related to each enqueued styles/scripts on the source code of every page. Please see below screenshot Just edit the post and add the scripts/styles in relevant boxes in bar (|) separated format to remove it from that post. Please see below screenshot  ...
Read More

WordPress plugin – Custom Admin columns for sorting and filtering

This plugin adds the capability to add custom columns to any post type to provide sorting and filtering of posts using those columns. Download the plugin Download the plugin from the wordpress plugin repository Installation To install the plugin follow below steps Upload the plugin files in wp-content/plugins folder (same as any other wordpress plugin) Activate the plugin Configuration Open the settings page "Custom Admin Columns for Sorting and Filtering" As shown in the below screenshot add the extra fields and labels in comma separated format to the required post type Custom columns will then appear on the respective post listing  ...
Read More

How to create wordpress options page

Creating Wordpress options page in Dashboard for your own plugin is quite simple. Generally it is used to set global preferences for your plugin which you want to let the users customise as per their requirement. We will create a settings screen by creating a class as that is the simplest way of creating your own options page for your custom plugin. It can be done in 5 simple steps Declare Class for the settings Page Add the page in the settings menu Register your settings Create the backend options Finally generate the options page Here is the entire code [crayon-59ebd61cdbdc6953999876/] Now we will discuss each function in detail First of all we have named our class as someCustomPluginSettings The constructor just calls the add_admin_menu function and initialises the settings registration [crayon-59ebd61cdbdd4046162289/] Below function creates the admin page. Here we need to provide Title of the settings page Capability (this decides who will get access to this page). manage_options means editors and above can access this page. Slug of the page [crayon-59ebd61cdbdd9467892435/] Below function registers the settings variables, description on the settings...
Read More

Plot multiple places on Google Maps – WordPress plugin

Plot events, photos, places, etc on Google Maps using a simple Wordpress shortcode which is built using Google Maps API. Everything below can be achieved easily with a simple plugin, XML file to provide the markers and a configurable shortcode Plot Multiple Locations on a Map Marker Clustering (markerclusterer) Ability to click each marker to get more details i.e. through a Marker popup Marker's info popup details is customizable through shortcode and CSS Ability to set initial zoom level Step 1: Get an API Key for Google Maps API First of all we need an API key for Google Maps. You can get an API key from Google Developer Console Here are the steps to create an API Key 1. Visit Google Developer console Projects page and create a project as per your requirement 2. Go to API Manager and select the project created in above step 3. Enable Google Maps JavaScript API and Google Maps Embed API 4. Click the Credentials link 5. Click New Credentials and select API Key....
Read More

Replace wordpress search with Google Custom Search (CSE)

For better search results or due to integration with Adsense you many want to replace wordpress search with Google Custom Search (CSE) Below are the steps to follow using a simple wordpress plugin. [Download Plugin] 1. Register you site on Google Custom Search by filling a simple form as shown below 2. After creating your CSE you will get a search engine ID as shown below. Make a note of this ID. 3. Create a page to display the search results page and add [PW_ADD_GSEARCH_RESULTS] shortcode on this page. 4. Add the the URL of the search results page on the setting screen of the plugin. 5. Comment/Remove the code in searchform.php in your themes folder of probably header.php and add below code instead [crayon-59ebd61cdca20312245437/] This will create the search box.        ...
Read More

Create wordpress plugin for custom PHP code

Often there is requirement to create your own PHP application and generally most people tend to install a plugin which allows to run PHP code snippets as it is much easier to do so. Although this approach may seem ok it may not be ideal. Lot of times people use this approach because they do not know how to create plugin for the same in Wordpress. Actually it is much easier to create wordpress plugin than you think. I understand it may take a bit longer to create a plugin than just writing a PHP code snippet. However the difference is not that big. Creating your own Wordpress plugin for your requirement works out better in the long run It allows you to deactivate as soon as you feel you do not need the code to run on your site You are in total control of the code. If the PHP plugin which allows you to run your PHP code snippets stops providing support or is no longer...
Read More

WordPress – Limit pages displayed in the parent page drop down

If you have lot of pages in your wordpress site then it becomes quite big problem selecting parent pages from a huge drop down. There is a way to show only selected pages in the drop down as selectable parent pages. This is never an issue for bloggers who have majority of their content in posts as there is no need to select parent post for a blog. Download this plugin from Wordpress plugin directory Step 1: Create a custom field/Radio button to select if the page is to be listed in the drop down or not [crayon-59ebd61cdd8b5960026924/]   Step 2: Save the option to the post custom field [crayon-59ebd61cdd8be324326645/]   Step 3: Limit pages listed in the page attributes drop down and quick edit parent page drown down [crayon-59ebd61cdd8c3667800010/]   In Step 3 we are checking for pages which have custom field parent_dropdown set to 0 and excluding those pages from the page attributes drop down pages...
Read More