Send Mail from an AMP page

In one of my projects I embedded Google's new open-source initiative, AMP(Accelerated Mobil Pages). It was a WordPress website. I was all done with most of the part of website, however there was still a module which needs research i.e. implementing contact form into website.

While, we implementing any form in a website, we need to add validations as well as the data-handler scripts. So, I had two problems to resolve on:

Calculate Fortnight Date

The following code will calculate a recurring fortnightly date from a given date, i.e. a star-date. The date format should be 'Y-m-d' for the following code. However, you can make updates in it as per requirements.

For example: The start date for the fortnight cycle date was set to be as "2018-01-10". Then, as per current cycle, next will be 2018-02-20.

Select an element by name with jQuery

You can use the attribute selector for selecting an element with its name.
For example if you have to select input with its name.

WordPress AMP Plugin

WordPress AMP add AMP(Accerlated Mobile Pages) support to a WordPress website. WordPress AMP provides support for the inbuilt post types as well as the custom post types and custom taxonomies.

Post Hits Counter

Post Hits Counter v1.03.19 is now available on WordPress website with new improvements. Using Post Hits Counter you can capture each and every hit on your posts, pages and custom-post types.

Introduction to PHP

  • PHP is open source scripting language widely used for the web development. It was introduced in 1995 and is influenced by other scripting languages such as Perl, Java, C, C++.
  • PHP stands for 'Preprocessor Home Page'.
  • PHP scripts are executed on the web-server.

Run shortcodes from a custom field.

By default, WordPress Custom Fields display any of the string you enter, as plain-text. In same way when you try to execute a shortcode, (in the format [shortcode] VALUE [/shortcode]) you end up displaying the entire text, including the html tags.

This is because, Wordpress do not run shortcodes added to custom fields.