A few days back, Hon’ble PM of India announced the new global initiative – Make in India. I won’t be getting in to what MII is about or how it works, benefits, drawbacks etc. I am not an economist. I am a web developer so my area of interest and expertise fall under the web development part rather than the economic developments. Make in India has an impressive website but it lacks at some places. That’s what I am going to describe below.
Just out of curiosity, I looked up the source code to check what’s under the hood. And, surprisingly it’s WordPress!
Is it truly powered by WordPress?
On a closer look, I realized that it’s not a right implementation of WordPress. It’s powered by WP but not yet leveraging any of the core features.
How it fails being a WP site?
- All paths to stylesheets and other assets are relative paths.
- Which means that there’s no proper enqueuing of scripts
- The main navigation doesn’t use WP menu. Instead it’s a plain HTML menu coded directly in to theme files (probably header.php)
- Flexslider is used for front page slideshow. But, wait, there’s no slideshow. Only a single image.
- All other pages looks like to be using custom page templates or custom PHP files.
How do I say that it’s WordPress and not done correctly?
All WordPress sites and blogs follow a similar pattern when it comes to the points I have mentioned above. There are set coding standards that developers follow. There are post types to manage content and query loop to output the content.
Scripts and Style Files:
WordPress recommends every theme and plugin developer to register and enqueue each stylesheet and script that is being used by the theme/plugin. When following this practice WP returns an absolute path of the file.
WordPress offers a very powerful and flexible menu system that can be used to create navigation menu for every website. It generates default CSS classes and IDs for various elements so that developers can style the navigation with CSS and a standard can be followed easily.
But, looking at Make in India website’s navigation system, I don’t see any default CSS classes or IDs. It looks like a plain HTML navigation. So, why use WordPress?
Home Page Slider
I can make an assumption here that developers might add more images later. So, this gets a benefit of doubt. Otherwise adding a Flexsldier JS file for displaying a single image doesn’t make any sense.
I doubt if there’s any page template being used. WP generates body class in most of the cases and developers usually add body classes to <body> tag for identification and styling of different page templates. I don’t see any such classes on Make in India website.
WordPress outputs content using The Loop and there are default CSS classes which are applied to each content section. This can be enabled/disabled depending on developer’s code. But, WP recommends adding content classes which are not present on MII website.
On a side note, I don’t see any tracking scripts being loaded on the site. Analytics are an important part of each website and it can provide some useful user data. But, it looks like this has been ignored.
In short, Make in India website doesn’t follow any WP practices. So, I don’t see any advantages of using WordPress here. A plain HTML site could have done the same job.
How to fix it?
The only approach that I can think of fixing the site is to rebuild it. Although the code needs to be re-written, certain parts of CSS can be reused as the structure will remain almost same.
- Use a starter theme, such as _s (underscores) to kick start the development process.
- Follow WP Codex Theme Development guide.
- Understand and follow Template Hierarchy.
- Make use of The Loop.
- Theme Review Handbook.
My intention is not to complain about the efforts being put in building the website. Make In India has a really impressive website and it will be great to see such level of design and development being adapted for other government websites as well.
A correct approach would have led to a better website with powerful Content Management System in it’s place.