November 4, 2016

How to get timezone of client machine with JavaScript?

function formatedZone() { var now = new Date(), tzo = -now.getTimezoneOffset(), dif = tzo >= 0 ? ‘+’ : ‘-‘, pad = function(num) { var norm = Math.abs(Math.floor(num)); return (norm < 10 ? ‘0’ : ”) + norm; }; return dif+pad(tzo / 60)+ ‘:’ +pad(tzo % 60); }

September 30, 2016

WordPress Plugin – WP Quick Shop

WordPress Plugin – WP Quick Shop

September 21, 2016

How to get latitude & longitude from address or postcode string

function address_to_lat_lng($address){ $ret = array(); $address = urlencode($address); $url = “http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false”; //pree($url); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_PROXYPORT, 3128); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); //pree($response); $response_a = json_decode($response); $ret[‘lat’] = $response_a->results[0]->geometry->location->lat; $ret[‘lng’] = $response_a->results[0]->geometry->location->lng; return $ret; }

August 29, 2016

s2member

Setup WooCommerce Discounts and link with s2Member user roles/level: How it works? Create membership levels with s2member > Membership Levels/Labels.  | Video Tutorial If membership levels are created already so you will have them in “Membership Level” dropdown here (on this page, see left). Now select Discount Type either fixed price discount or percentage discount. Now […]

June 12, 2016

For some reason with this plugin, the text “Related Articles” isn’t showing up above these even though in the plugin it is activated.

“Related Articles” isn’t showing function jetpackme_related_posts_headline( $headline ) { $headline = sprintf( ‘<h3 class=”jp-relatedposts-headline”><em>%s</em></h3>’, esc_html( ‘Related Articles’ ) ); return $headline; } add_filter( ‘jetpack_relatedposts_filter_headline’, ‘jetpackme_related_posts_headline’ ); customize-related-posts

June 6, 2016

GP Framework

GP Framework Guava Pattern – A WordPress Theme Development Framework Apparently it looks just an options framework but its much more than that. Default Features: Zero Configuration Required No need to enqueue CSS and JS files. Its automatic. Repeater fields functionality added. It can handle multilingual websites without using any plugin like WPML etc. It […]

June 2, 2016

Using Enfold Layer Slider as a Plugin

Using Enfold Layer Slider as a Plugin You might will get surprised that if Layer Slider is a plugin already so what is this post about? In fact Layer Slider WP plugin comes in enfold within the theme and it works really well. But normally developers don’t try to mess with it and i had […]

May 31, 2016

PHP array_filter trim is not working as callback

PHP array_filter trim is not working as callback Have you tried this? $arr = array_filter($arr, ‘trim’); Solution: $arr = array_filter(array_map(‘trim’, $arr));