Sunday 13 August 2017

Creating Custom Shortcode in Wordrpress

In WordPress, we can create our own shortcode with the help of add_shortcode() function. You have to place this shortcode function in your functions.php file.
The add_shortcode() function uses two parameters:
add_shortcode(‘shortcode’, ‘create_short_code’);
1. ‘shortcode’-> name of shortcode.
2. ‘create_short_code’-> callback function name.
Here’s the example for creating shortcode:
function create_short_code() {
return 'This is the test for create shortcode in wordpress';
}
add_shortcode('ShortCode', 'create_short_code');
How to use this shortcode:
1. In WordPress editor, you can call this shortcode by: 
2. In WordPress theme php files, you can call this shortcode by:echo do_shortcode('custom_text');

Open Bootstrap modal pop up on button click with jquery

$("#buttom id").click(function(event){
  $("#modalboxid").modal('show');
});

How to change the place order text on checkout page?

To change the button text on checkout page, you just have to add simple function in your functions.php in your WordPress theme. We will use add_action method to change the button text.
add_action( ‘woocommerce_order_button_text’, ‘my_custom_checkout_text’ );
function my_custom_checkout_text() {
return “Place My Order”;
}

About Myself


Hello everyone, welcome to my blog.

Myself Ajay Malhotra. I am full stack developer. I love to make websites in Wordpress and Laravel.
I know php, laravel, symfony, angularjs, wordpress and many more..

Hope you will like my blog and my posts.
Thank you.

Google Map Filter Api Example

Here is Google Map Filter Api Example: