Get wordpress page content via ajax request

Get wordpress page content via ajax request codes are very simple and you always need something like this to make some professional steps towards yor layout.  For admin backend put below code in functions.php which is creating an ajax action ‘my_action’ which can be called from script which is  given right below this code. add_action( …

Extract all wordpress shortcode in jQuery object

Extract all wordpress shortcode in jQuery object from the wordpress editer whose html id is #content. This supports same level and hierarchical both. See in fiddle https://jsfiddle.net/shakalya/jswe18kL/   <script> jQuery(function() { var pageContent = jQuery(‘#content’).html(); var data = {}; var data = parseShortCode(pageContent); console.log(data); function parseShortCode(shortCode) { var regex_for_match = /\[([\w-]+)([^]*?)(\/?)\](?:([^]*?)\[\/\1\s*\])?/g; var count = 0; …

Add phpcaptcha in contact form 7 with validation

Add phpcaptcha in contact form 7 with validation in WordPress which you can download from below w3schools website. http://www.w3schools.in/php-script/captcha/ 1. Extract phptextcaptcha in your theme directory of wordpress. your directory will be like. yourthemepath/phpcaptcha/css yourthemepath/phpcaptcha/font yourthemepath/phpcaptcha/captcha.php yourthemepath/phpcaptcha/phptextClass.php where captcha.php path will be generating an image and put the value of it session $_SESSION[‘captcha_code’]; 2. In …

List of countries with country code , dial code, currency name, currency symbol, currency code

I have been searching for List of countries with country code , dial code, currency name, currency symbol, currency code and managed to get records from all over the internet. You can download All country with (country_code, dial_code, currency_name, currency_symbol), All states and all cities data from below.. which are interlinked with foreign keys. Download World …

Image helper file for CodeIgniter

Image helper file  for Codeigniter to edit, resize and get image parameters. <?php class Image { private $file; private $image; private $width; private $height; private $bits; private $mime; public function __construct($file) { if (file_exists($file)) { $this->file = $file; $info = getimagesize($file); $this->width = $info[0]; $this->height = $info[1]; $this->bits = isset($info[‘bits’]) ? $info[‘bits’] : ”; $this->mime …

Build a custom toggle function for reuse in jQuery

Hiee there, I come up with some handy toggle function which can be used in your project with all customisation…so you can customise this accordingly. Build a custom toggle function for reuse in all toggle functionality.   Check out the live example in fiddle https://jsfiddle.net/shakalya/a35mgrwt/   <script type=”text/javascript”> $(document).ready(function(){ var contentToggle = $(“.shaky-toggle”); contentToggle.each(function() { …

Allow accessing WAMP server from local network

There are several configuration you might needed to Allow accessing WAMP server from local network. I have been setting this up and after a long search i found some steps which need to be remember i case you are allowing accessing remote user in Local Network. Step 1 Click on wamp->apache->httpd.conf or find this file …

Install php mysql apache2 in ubuntu

There are few ways to install php mysql apache in ubuntu. sudo apt-get install apache2 sudo apt-get install mysql-server sudo apt-get install php5 libapache2 sudo /etc/init.d/apache2 restart You can also restart apache from sudo service apache2 restart Install phpmyadmin sudo apt-get install phpmyadmin You will need to configure your apache2.conf to make phpMyAdmin works. sudo …