How to Add Custom Fields to WordPress Post

Many times you feel the need for custom fields for a WordPress post/page. You can assign custom fields to a post by creating meta-data. Yes, this is what WordPress calls these custom fields. This way your WordPress posts can be more than just posts.

So, let’s create some custom fields.

We will be adding following custom fields to our posts:

1. Image URL – Url of an image to show before the post content

2. Read also – Link of another post at our blog that we would like visitors to read

We will create a metabox for these two fields. (more…)

How to secure WordPress Website

We all know WordPress is the most popular Content Management System, powering millions of websites all over the web. This makes it the favorite target for hackers. You can secure your WordPress website by following some easy practices which are mentioned below.

Never use admin as username

Easiest thing you can do to give hackers a difficult time, is to never use “admin” as username for login. You can easily block most of the brute-force attacks by following this practice. WordPress asks the username while installation when you can choose a catchy username (something like HocusPocus or SeriousSam ;)) other than “admin”. (more…)

How to make TripAdvisor Widget work on HTTPS

Recently, while working with a client, I faced an issue related to TripAdvisor review widget. The issue was the widget was not being rendered on the webpage with secure (HTTPS) url. The widget was loading Javascript from non-secure (HTTP) url and the webpage was blocking that content being requested from a non-secure url.

After going through TripAdvisor support forums, it became clear that they had no solution for this, as the request to fix this bug had gone unanswered and related post had been closed. It was time for brainstorming :)

Have a look at their widget: (more…)

How To Create WordPress Theme

How to Create a WordPress Theme

We are going to create a simple WordPress theme to have the basic idea of WordPress theme development.

Theme Structure

There will be five files in our theme:

  1. style.css – Will have the CSS style and theme information, like – author and other complimentary stuff
  2. index.php – Is the main webpage template
  3. header.php – Is template file for the header area of webpage
  4. sidebar.php – Is template file for the sidebar area (right side) of webpage
  5. footer.php – Is template file for the footer area of webpage

(more…)