By: amitpal

Set page template for all pages in wordpress with database update via functions.php
April 27, 2018

Set page template for all pages in wordpress with database update via functions.php add_action( ‘admin_init’, ‘set_page_templates’ ); function set_page_templates(){ $current_template =…

Read More
How to override or change template forcefully for posts with functions.php?
April 27, 2018

add_action( ‘admin_init’, ‘set_page_templates’ ); function set_page_templates(){ $current_template = get_post_meta( $page->ID, ‘_wp_page_template’, true ); echo $current_template.’amit’; foreach( get_posts(‘post_type=post&posts_per_page=-1’) as $page ) {…

Read More
Whatsapp Payment Invite Link
April 9, 2018

Whatsapp Payment Invite Link: To get the Whatsapp Payment option please click on the invitation button below: Once you will request…

Read More
Disable New Line in Textarea when Pressed ENTER
March 26, 2018

Disable New Line in Textarea when Pressed ENTER Disable New Line in Textarea when Pressed ENTER <script> $(document).ready(function(){ $(“textarea”).keydown(function(e){ if (e.keyCode…

Read More
How to convert url to embed code from youtube and vimeo url dynamically?
March 24, 2018

How to convert url to embed code from youtube and vimeo url dynamically. Some video projects includes google api need to…

Read More
How to index html table rows? or how to Auto-number table rows?
March 23, 2018

How to index html table rows or how to Auto-number table rows? CSS: Method 1 table {     counter-reset: rowNumber;…

Read More
MailChimp API and PHP Script to Add Subscriber in List Campaign
March 18, 2018

MailChimp is an email marketing service, helps to manage the subscribers of your website. MailChimp provides an easy way to integrate…

Read More
How to build a WordPress Post Pagination without plugin?
March 14, 2018

The function Paste this function code in your theme functions.php file: if ( ! function_exists( ‘post_pagination’ ) ) : function post_pagination()…

Read More
How to add menu page with different name for first submenu item in wordpress?
March 12, 2018

You can make the ‘slug’ for the submenu page equal that of the top level page, and they’ll point to the…

Read More
How to create custom widgets in WordPress?
March 12, 2018

Creating a Custom Widget in WordPress You can also paste the below code in your theme’s functions.php file. However, it will…

Read More