We at blogvault arrived at a situation where we needed to convert some of our pages into posts. One’s common sense will tell to create a new post – copy everything from content to title as in page to the new post – delete the old page and finally publish the post! This should work great is your permalink is set to wordpress default (or you have some custom setting that handles it somehow using the id). But in our case our permalink setting was:


Post namehttp://


So when we visited the new (post) link after deleting the old page, we got 404 – Page not found!


Understanding the issue

As you can see the same thing works for a particular permalink setting but fails for another. This can be explained as – wordpress maintains a common (database) table for both post and page under the name ‘wp_posts’. As each entry in the table has its own unique id, when we try to locate them using id in permalink (as wordpress default) we face no problem.

However its not the same with our permalink setting. Due to some reason, on deleting a page (or post) from admin panel, wordpress does not immediately remove their corresponding entry from the database. So when resolving the address by post name, wordpress finds the earlier entry (page in our case) which is marked deleted, hence giving the 404 not found error.



One simple solution is using plugins exclusively made for this purpose. Some of them are:




However incase you don’t mind getting your hands dirty and saving your site with the load of extra plugin, you can follow these steps (with extreme precautions).

  • Get access to your wordpress database. You may use phpmyadmin for that.
  • Open the wp_posts table.
  • Locate your post entry and replace its ‘post_type’ from ‘page’ to ‘post’ or vice versa.


Incase you already created a new post as in our case and are now getting the 404 error, simply delete your earlier (deprecated) entry.

SQL query for same will be:

Post to page

UPDATE wp_posts SET post_type=’page’ WHERE id=<your_post_id>;

Page to post

UPDATE wp_posts SET post_type=’post’ WHERE id=<your_post_id>;


Hacked - A Perspective
Image Credit: Johan Viirok Creative Commons license BY 2.0

Couple of days earlier, a team member pointed out to a discussion in a WP community on Facebook. The lady in question had suspicious files in her site due to a broken plugin. She poured out her doubts, feelings as well as queries for the fix she needed through multiple posts. That underlying feeling of being trapped, of being cheated was unmistakable. It was akin to having someone break into your house whilst you are still there and enjoy your property at your expense, unknown to you. She admitted to feeling bad and understandably so.  Since the only alerts that she was used to, were plugin updates, the shock of it all was only too imaginable.

What had happened, in brief was, that on logging in, she noticed a security alert, which she verified with another security check. One can only imagine that she was sincerely hoping and praying that the worst was not true and it was just some overlooking on her part.

That was however not the case. She quickly started posting on what she thought were the options open to her.

Image Credit: Berishafjolla licensed under Creative Commons Attribution-Share-Alike 3.0 Unported license. Source:http://www.knowledge-commons.de/en/the-non-experts-are-the-real-experts-open-innovation-talk-at-republica/
Image Credit: Berishafjolla licensed under Creative Commons Attribution-Share-Alike 3.0 Unported license.

The first option was to review logs for which each entry would have to be checked from the back-end so as to find the issue at hand. This could be impossible if there is too much data to go through or limited information at hand. There are cases where the logs are lost or may be difficult to decipher.

Secondly, she could backup, do away with the contents of the problem site and restore. However, what if the backup also had the hack? How does one be sure that all contents of the backup are clean? The only way to do this, would be to run a security check after restoring.

It was only too obvious that she was thinking loudly through her posts and that  these were the multiple thoughts running through her mind. The community reached out to her. Common solutions given were:

a) to back up everything- this is useful especially since a backup can save much time and effort in restoring a site.

b)  update all plugins – Often older versions of plugins contain vulnerabilities which are exploited by hackers. Hence it is advised to update the plugins to their latest versions.

c) clear cache.

d) look in Temp folder – Hackers at times upload malware in the temp folders and hence cleaning them is advisable.

e) Look for files with suspicious code. Malware at times contain certain strings like base64_decode or eval. Searching for files with such code can help identify malware too.

  Image Credit : Zsolt Biczo/Shutterstock
Image Credit : Zsolt Biczo/Shutterstock

The above mentioned are good points to follow. Read up to know more on what to do  when your WordPress site gets hacked.

The lady got back shortly with a second post wanting to know if she should access files through FTP or SFTP or take backup and restore her site. One suspected malware and she double checked every move she made. Loss of faith would be the natural thing in such cases, it is after all a breach of security.

She was unsure whether she should access the WP admin or not. One needs to be wary of logging into the admin when hacked since the hacker might have left some code to track the password used to login. The above is a possibility. For safety in such cases, the password can be changed using phpMyAdmin or FTP before logging into the WP Admin.

She got helpful responses for her second post as well. It was really heartening to see so many people reach out to someone, eager to help out. That set the ball rolling. She posted each step of action taken, waited to hear back on comments so that she could gauge her way out of the mess her site had become.

She was not only somehow wanting to fix the issue but also keen to find out where the issue started first. She seemed to be taking notes on what to do and what not to do going forward. The nomenclature of the diseased plugin seemingly added to the confusion and frustration. The site appeared to have been affected by the Slider Revolution hack

At the end of the week, when it was thought that an issue had been solved, lessons had been learnt, she posted again. She had received an alert about the installation of a plugin that her host had added to her freshly cleaned site. Clearly, she had hit the panic button hard. Help was at hand, so was empathy. The community member who had suggested she check changes on her site with her host, also posted that he imagined being in her shoes and it was not a good feeling. She stated that her host provider was frequently updating plugins without permission. While that may be part of the problem, it is not the core issue.

Though she had zeroed in on the folder with the malware, the key concern would be to find out  how the break in happened and fix it accordingly. Frequent security checks and identifying possible hacks can save you from a lot of grief.

All in all, a scare, though very unpleasant to recount, does keep us on our toes. So, how do you protect your site?

WP to Twitter

As soon as you have a new post ready on your website, it would be great to update your twitter followers so that they can read the post. It is very convenient to be able to do this automatically whenever you have a new post. There are several WordPress plugins that provide this functionality. Let us take a look at one such plugin –“WP to Twitter”. This plugin can be searched and installed from the WordPress plugin repository.

This plugin connects your WordPress website to your twitter account so that a new post can be automatically tweeted. Once installed and activated, this plugin is ready to be configured with your Twitter API keys and Access tokens by creating a Twitter application.

WP to Twitter options

We shall see how to obtain the keys from thetwitter applications registration page. Fill in the application name and your website URL (the Callback URL also needs to be the same) to create the twitter application.

Create an application

Your Twitter consumer keys will now be created. Please note that it should not be shared with anyone.

Twitter App settings

Here you can see that the default Access Level is “Read-only”. If you want your Website to post to Twitter automatically, you will need to have “Read-Write” permissions. Change this by clicking on “Change App Permissions” link or button above. Or you could do it from the “Permissions” tab as well. You can then create the access tokens by using the button – “Create my access token” at the end of the page.

Create Access Tokens

You will get the tokens displayed on the next page. This again should not be shared with anyone. Make a note of these tokens and keys and enter them on the WP to Twitter plugin settings on your dashboard.

Connect to Twitter

You have now successfully connected your website to Twitter. There is an option to shorten URLs as well. There are also advanced options to set up Google analytics, Add custom texts before or after tweets, chose not to send tweets by default etc. You can also select which category of posts you would like to publish.

Once the settings are saved, you will now see your posts beings updated on your Twitter account.

You can also change the settings using the metabox available on the right sidebar of your post editor. You can customise your Twitter post, or chose to not tweet this particular post.

sidebar options



The WP Summit, March 16 - March 25,2015.
The WP Summit, March 16 – March 25,2015.

WP Summit, hosted by Jan Koch is an online event happening from March 16 – March 25, 2015. The summit will bring together, WP experts on the same platform to talk about their take on subjects ranging from WordPress, website design, content marketing, copy writing and many more. Use their best insights to build your online business and add value to your WordPress blog.

Noted speakers include -

  • Rand Fishkin, founder of Moz.com
  • Oli Gardner, co-founder of Unbounce
  • Dan Norris, founder of WP Curve
  • Tony Perez, CEO & co-founder of Sucuri.net
  • Tim Paige, Conversion Educator at LeadPages
  • Natanael Oliveira, CEO of Marketing com Digital
  • Andy Crestodina, Author of Content Chemistry
  • Tomaz Zaman, founder of Codeable

Akshat Choudhary, Founder, blogVault, has been invited to speak on Backups and Security. He will be speaking on 24th March 2015. All interviews will be available for free for a limited time.

Akshat Choudhary, Founder, blogVault
Akshat Choudhary, Founder, blogVault

Sign up at  http://thewpsummit.com/ to hear from 24 world-renowned experts and learn how to build a WordPress site with the winning edge.

If you love to travel, you would want to have a travel blog at some point. It can help you in the following ways-

  • You can connect with like minded travellers and even find some company for the next trip
  • You can journal all your travel experiences and photographs in one place to share with family and friends
  • You can even make some extra money with your blog! Or try to find sponsors for your next trip!

These are just some of the reasons to have a travel blog, there could be endless reasons!

Here is a quick and easy guide on how to set up a travel blog using WordPress. WordPress is a powerful medium to setup your travel blog as it supports various features that enable you to seamlessly share photographs, videos and also include maps on your website. The basics of setting up a website using WordPress has been discussed in the article “Setting up a WordPress site from scratch”. Once you have your blog up and running you will need some of the following essentials to turn it into a fabulous travel blog.

Themes and other customizations – First and foremost, your blog needs to look good to attract readers. Visual appeal can be the most powerful one in generating traffic for your blog. Fortunately, you do not need to spend too much time or effort trying to do some web designing. There are various themes (both free and paid ) available in WordPress to customize for your travel blog and also improve the appearance. Themes can be accessed from the Appearance Menu of your dashboard. As a start, you can search for a travel based theme and apply it to your blog.


Your blog can be further customized with the various options under the “Appearances” menu. You can choose the colour scheme, header images, menu and sidebar layout etc.

Adding maps to your site or posts – Let us consider the following scenarios.

  1. You are just back from a grand tour of a major continent like USA or Europe and have covered a lot of places. Wouldnt it be great if you could mark off all these places on a map and show it in one shot to your readers ?
  2. You are trying to create a travel wish list and would like to mark places that you want to visit in the near future. A map with these markers would surely grab the attention of readers and they would want to explore your blog.

Again, adding a map to your blog either in a post, page or as a widget is very easy. There are various plugins for this purpose. A map also makes your blog instantly look better ! Lets see that below !


Adding photos to your blog

Once you have a nice travel story to tell, you would like to highlight it with some great pictures. A good picture can turn a ordinary blog post into an extraordinary one. Or if you just have a few words to say, you can add more pictures to your post. Or just have pictures in a post and let them do all the talking ! The choice is yours.

Photos can be added to your travel blog in several ways. The simplest thing to do is to upload the relevant photos to your post or page using the “Add Media” option on your “New Page” or “New Post”. You can upload files from your PC. This could be cumbersome if you have too many photos to upload, or if you want to showcase a gallery on your blog. Also the pictures can take up too much of storage space. An alternate solution is to add photos from your Flickr account or Google plus account onto your blog. There are several plugins for this purpose.

This is how a photo gallery would look on your blog ! The reader can see the thumbnails and even click on them for larger images. Different plugins offer different features and display options for your photos.


Adding videos to your blog – When you have a travel blog, it would be great to add some videos as well. Imagine that you did some adrenaline rushing adventure sport like bungee jumping in New Zealand. Words cannot describe how you felt during the jump. But you have a short video clip that could do wonders to explain the adventure ! Or you just travelled through some really scenic rail route in Switzerland and you have several videos capturing the change of landscape and scenery. Your blog would be more meaningful with these video clips added to the posts in addition to photographs.

While videos can be uploaded to your blog, it is recommended that you upload your videos to one of the popular services like YouTube and embed the video on your blog.

The video can be seen on the blog post as shown in the below example.


Organizing your posts – You can organize your posts into Categories so that they can be browsed and indexed easily. For eg. you can have the categories of “Beaches”, “Temples”, “Mountains” for your various travel destinations and experiences.

You can add a New Category from the Categories option under the Posts menu. You can create hierarchies in the categories as well. In the following example there is a Category called Asia and then India under it. The hierarchy can be specified by choosing the Parent category option.


The categories show up on the sidebar of your blog for easy browsing of posts/articles.


Some useful plugins for your travel blog

Apart from the plugins discussed above for adding photos, videos and maps on your WordPress site, here are some useful plugins for your blog.

  1. WP smush.it plugin  - This plugin can be used to compress and optimize the images without losing image quality on your WordPress site so that the page loads faster.
  2. Social media icons – There are various Social media icons plugins available from the WordPress plugins repository. They help you to add social media icons like Facebook, Twitter etc to your blog which enables the user to connect to your Social media pages with one click.
  3. WordPress related posts – This helps you to add related posts as thumbnails at the footer portion of your posts and increases your internal traffic as the readers get to see more articles of their interest.
  4. SEO by Yoast – This plugin helps to get your blog or website indexed with search engines and also rank higher in search results. This has been discussed in detailed in an earlier article – WordPress SEO by Yoast.
  5. Jetpack- This plugin provides various features for customization, traffic, mobile, content, and performance tools
  6. WP to Twitter – This plugin is useful to automatically update your twitter feed whenever there is a new post.

These are just some tips to get you started on your travel blog, and with WordPress, the options to make your blog interesting and captivating are endless. Do visit wordpress.org for more possible customizations for your purpose.

It is rightly said that a picture is worth a thousand words. So it is quite natural that you would want to add pictures to enhance your website and describe it better. Pictures can be included in several ways. We shall see one of the ways to add a Flickr album to your WordPress website.

Integrating your Flickr album

Flickr used to have the photo sharing option to WordPress which was deprecated recently. But there are several plugins to achieve this purpose. Flickr albums can be added to a Widget, page or post depending on the plugin. Let us take a look at one of the popular plugins “Flickr Album Gallery”. This plugin can be installed from the WordPress plugin repository.

flickr plugins

Before you get started, you need to get your Flickr API key. Go to the Services page (https://www.flickr.com/services/) from your Flickr login and select “Get an API Key”.


You will see the following page. Select Non- commercial as your purpose.


Next, you need to fill in some details. Mention the plugin name and the purpose of the plugin.

Flickr - Application Sharing!


Click on “Submit” to create your unique key as shown below. This key will be used to create and add galleries to your website.


Once you have the API key, you can add a new gallery by clicking on “Add New Gallery” from the “Flickr Album Gallery” menu on the dashboard. You can add a Title and then the important information of Key and Album ID which will enable this plugin to connect to your Flickr album.


The Album ID can be obtained by visiting your Flickr homepage and clicking on the album that you want to share. The Album ID is the number shown at the end of the URL.


Click on “Publish” to have the gallery ready to be added in a page or a post using a shortcode. You can see the Shortcode for this album on the right side.


This shortcode can be pasted on a New page or post to add the album.


You can add any text, Save and Publish the post. This is how the album looks on your WordPress website!




All of us are prone to human errors and it is quite common to end up creating a new “page” instead of “post” or vice versa on your WordPress website. To avoid any rework, it would be convenient to convert a page to a post or vice versa. This can be done easily with the “Post Type Switcher” plugin which allows you to switch the post type which editing the post. Prior to installing this plugin, the page/post edit section looks like below.

Edit page

This plugin can be installed by searching for it in the search box.

search plugin

After installation, it needs to be activated. To switch the post type, open the page or post to edit. You can see the “Post Type” option on the right side of the page.

Edit page

As in this example, if you are trying to change a Page to a Post, click on “Edit” and chose the option of “Post”. Click on “OK” and “Update” to finish the conversion.

Edit page

Now you can see that the Page has been switched to a Post.


While you can upload a video and host it on your WordPress site, it is highly recommended that you do not do it. Videos can take up a lot of storage space and also providers like YouTube process the video to provide better quality.

A simpler approach would be to upload the videos to a popular video service provider like YouTube and then embed the video on your WordPress site. You can also embed existing videos in this approach. This article discusses embedding videos from YouTube, but other providers are supported as well.

Embedding YouTube Videos

The simplest way to embed a YouTube video is to paste the URL of the YouTube video onto the Visual editor of your post or page. For eg,https://www.youtube.com/watch?v=vjnaknNly8c is the URL, which needs to be pasted on a line by itself. You have to ensure that there is no other content on that line except the URL. Also you have to ensure that this line is not hyperlinked. You can now see a preview of the video in the Visual editor as follows:

adding video

You can add any other text or images and complete the post and publish it. As simple as that!

You can also add a video by using a shortcode as follows. This needs to be pasted on the text editor.


Again, you can see a preview of the video in the Visual Editor.

Customizing your video

The previous section described how you can embed a video by using a shortcode. You can customize the video display with the shortcode as well. Here are some examples:

- Customizing the size of the video

You can specify the height and/or width of the video with the “&h”=and “&w” variables.

- Customizing the start and/or end time

You can specify the start and/or end time to play the video with the “start” and “end” variables and specify the time in seconds.

- To hide related videos from appearing after the video is done, use the variable “rel=0”

Videos can be added to the footer or sidebar as well, by pasting the shortcode onto a text widget.

A video can also be embedded in the comments section by simply pasting the URL.

It is also possible to stream a live broadcast using Youtube or Google hangouts air feature on your WordPress site.




WordPress SEO


Introduction to SEO

You have just launched a great looking website and now you want visitors to your site. You are suddenly left wondering if someone can even see your site when they search for something relevant to your website. Then someone tells you that you need SEO to list your site higher in search results! Now what is this SEO?

SEO stands for Search Engine Optimization. Most of the search engines like google, yahoo, bing etc provide a listing of search results comprising of webpages, videos and other relevant content based on the search string provided. The ranking of the search results is based on the search engine’s estimate of their relevance to the search topic. SEO helps in getting your website into a higher or a better ranking on the listing. The WordPress SEO by Yoast is the most comprehensive solution for SEO and they have a host of services to cover the needs of most users. Let us have a brief look at some of the popular features and their configuration.

WordPress SEO Plugin by Yoast

The SEO plugin by Yoast is popular (with over a million downloads) and provides the most complete SEO solution for your needs. We shall see how we can accomplish some of the important SEO techniques with this plugin.

Have a good “display” in search results

The first and foremost thing that you need to take care of is to ensure that the description of your webpage looks good in search results and makes people visit your page. For this we need to add meta data to the home page and the posts.

- Add meta data for homepage

Meta data is special data that provides information about a webpage. They are typically added as HTML tags. The meta tags that are particularly useful for a search engine are the “Title” tag and the “Description” tag.

Title tag – This is the text string that is the title of the webpage and forms a part of the display by search results and helps people decide weather to visit your site or not.

Description tag – As the name suggests, this gives a brief description of the content of the webpage. Search engines pick up this content to display in their results.

The following example shows how the Title tag and Description tag look in a search result.



The meta data for the home page can be updated in the Yoast SEO plugin as shown below.



The other 2 meta data of interest are – Meta Keywords and Meta Robots. Meta Keywords contain some keywords which can be specified by you so that your webpage can show up in search results when these keywords are used. Meta Robots tell the search engines what to do with the webpage, whether to exclude from the search results, to follow links within the webpage and so on.

- Add meta data for posts

Just like the meta data for the homepage, we can update the metadata for each individual post so that they can show up during relevant searches. The following steps show you how this is updated. You could also just set a template for post titles and descriptions as shown.



Include a sitemap

A sitemap is a list of pages of a website that is accessible to crawlers or search engines and enables your website to get indexed by search engines. It provides search engines information about all the content of your website and also all the associated pages which the search engine might otherwise not discover. It also enables you to tell the search engines how to prioritize your content. Yoast SEO has a feature that generates XML sitemaps easily and quickly. Simply select the “XML Sitemap” button from the SEO menu and check the following box to enable the functionality.


When enabled, WordPress will automatically ping “google” and “bing” after post publication. Also you can select the option to ping “yahoo” or “ask.com” as well.

Have clean Permalinks

As the name suggests, Permalinks are permanent links to your individual blog post or categories. By default, WordPress permalinks contain characters like “?”, numbers etc which are not very intuitive to the user. (Eg, www.example.com/?p=22 ) While WordPress offers options to create user-friendly permalinks, this plugin offers more cleanup options as seen below. Some of the interesting things to configure would be to strip the “/category/” from the category links, redirect attachment URLs to parent URLs, increase crawl efficiency be removing the ?replytocom variable from comment reply links and disabling them. These options can be set by choosing “Permalinks” from the SEO menu.



Integrate with Social Media

This plugin allows you to seamlessly integrate with Social media like Facebook, Google + and Twitter. With this you can add “Facebook OpenGraph meta data” to your site which enables Facebook to pick up the right thumbnail and page information when a post is shared on Facebook. You can also associate your site with a Facebook profile and access your Facebook Insights as well. Also, you can associate your site with your Twitter and Google+ accounts as well.

Social media can be configured by selecting the “Social” item from the SEO menu.

social media


Add Breadcrumbs

Breadcrumbs are nothing but a trail of links provided for the user to navigate back to his starting point. They provide links back to the previous pages navigated by the user or a hierarchical structure of the parent pages. The links are generally separated by a “>” or “>>” sign.

Eg- Parent page > sub link1 > sub link 2

Yoast provides us with this easy feature to further boost your SEO. Select the “Internal Links” menu option and check the box which says – “Enable breadcrumbs” to set this option.



Add contents to RSS

With the Yoast plugin, you can add RSS contents to both the header and footer of your post. This helps in linking back to your posts so that search engines know that you are the original source of the article. You have options to add your author link, Post link, blog link, and blog description to the feed. This can be configured with the “RSS” option of the SEO menu.

rss feed

Advantages of this plugin

WordPress SEO by Yoast being one of the most comprehensive SEO solutions has numerous advantages. Some of the main advantages are:

  • Only one plugin for a host of SEO features as discussed above
  • Provides a snippet preview of how your post/page will look like in a search result
  • Post analysis tool
  • Automatically ping search engines
  • Export the SEO settings to another website
  • Import SEO settings from other plugins
  • Built in breadcrumbs creation
  • RSS feed support
  • File editor which allows you to edit robot.txt and .htaccess
  • There are a host of premium (paid) features like Integration with Google Webmaster tools, video tutorials for the plugin, manage redirects etc.
  • And last but not the least; it is available in 25 languages!

Let us take a look at some of these advantages in detail.

Import settings from other plugins

If you have been using other SEO plugins like “All in one SEO”, this feature allows you to import the settings onto the Yoast plugin. You can also import setting from other plugins by Yoast like RSS Footer, Yoast Breadcrumbs etc. All you have to do it click on the Import & Export button from the SEO menu on the left bar of your WordPress dashboard. Select the plugins you want to import from and then click on the “Import” button and you are done!



Edit files (robots.txt and .htaccess )

The robots.txt file indicates to search engines about the areas of your website that you don’t want to be scanned. .htaccess is a directory level configuration file that allows restricted access to specific sections of your website.

This plugin provides a text editor to edit these two files in a quick and simple manner. All you have to do is edit them from the “Edit Files” menu of the WordPress SEO plugin.



Snippet Preview

Another interesting feature is the Snippet Preview, which shows you a preview of your page and description as it would appear in google search results. By looking at this, it is easier to set a title and description as per your needs. This is shown below when you add a new page or post.


How to improve WordPress SEO?

While the Yoast plugin offers a variety of features, you can effectively improve your SEO by following a few of these steps for your website.

  • Configure Permalinks
  • Add Title tags
  • Use pages instead of posts
  • Interlink the posts
  • Use site analytics

Other SEO plugins

Some of the other popular WordPress plugins which provide SEO functionality are as follows:

  • All in one SEO
  • SEOPressor
  • SEO Ultimate

As we have seen, the WordPress SEO by Yoast plugin provides a very comprehensive SEO solution which can cover the needs of all kinds of users. Also a single plugin is enough to achieve a lot of objectives, thus reducing the configuration overhead for the user.


Why do you need a map on your site?

Just imagine the following instances where a map would add value to your website. You run a beautiful holiday home in the countryside; just a short drive from a bustling city. It’s a little into the forest will less phone connectivity! How would visitors reach your holiday home? Having the location marked out on a map on your website ensures that people reach your place will less hassles and are ready for a quiet vacation. Or you could be running a business where it’s vital for people to know how to reach your office with ease. Or you could just be having a travel blog and you want to show your readers where you have been travelling. In fact maps are a good to add feature for any kind of website, be it a business or leisure blog! Let us see some of the ways to add a map to your WordPress site.

Embedding a map to your site manually

It is fairly simple to manually embed a Google map to your website. Visit maps.google.com to open Google maps. Click on the region you want to focus on or type it on the text box to get a region of the map of your interest. Next click on the gear shaped icon on the bottom right corner of the map and select the option – “Share or embed map”.

Share or embed the map

You will then get the following window which provides the html code to embed the map on your site. You can select the size of the map to be embedded as Small, Medium, Large or Custom size.

Embed map tab selected

This html code can be used anywhere on your WordPress site to embed the map. You can embed it on a page, post or a widget. All you have to do is simply paste the code on the text portion of a page, post or widget. Here is an example of adding the map to a text widget. To add to a text widget, go to the WordPress dashboard, select the Appearances menu and add a new text widget. You can provide a title and copy the code onto the text box and save.

Adding the map to a text widget

Now your website has the map on the sidebar as below.


This looks good, but you can further enhance your site by adding a custom map. For instance a travel blog would look good with a map having markers for all the places visited. You can even highlight a route. Let us see how we can add a custom map next.

Embed a custom map

Open maps.google.com and click on “My maps” option below the search box.


Next choose the option to “Create a new map”.


You will then get a map which can be customized as per your needs.


You can add markers by selecting the balloon icon. Add the markers you want and save the map. Click on the “Share” button to make this map’s settings Public. Only by doing this, you can embed the map onto your site.


Next you can click on the 3 dots near the “Share” button and select “Embed on my site” option. You will get the html code to copy and paste onto your website as described above.


This can be pasted to a page, post or a widget. On adding it to the same text widget described above, the map looks like this now! The markers highlight the cities visited by the author of the travel blog.


We just discussed embedding a map manually on your website. There are simpler methods to add a map to your WordPress site by installing some plugins. There are WordPress plugins like Google maps widget which allows you to add a Google map as a widget to your website or anywhere else with a short code, WP Google maps plugin which allows you to add a map and also customisation of the map. Apart from these 2 plugins mentioned, there are a host of other plugins that support adding a map.