jQuery Cycle Plugin [All in one]

jQuery Cycle Plugin [All in one]

The jQuery Cycle Plugin is a slideshow plugin that supports many different types of transition effects. It supports pause-on-hover, auto-stop, auto-fit, before/after callbacks, click triggers and much more. It also supports, but does not require, the Easing Plugin.

The plugin provides a method called cycle which is invoked on a container element. Each child element of the container becomes a “slide”. Options control how and when the slides are transitioned.

The Cycle Plugin provides many options for customizing your slideshow. The default option values can be overridden by passing an option object to the cycle method, by using metadata on the container element, or by redefining the values in your own code.

Freelance web designer & web developer for hire.

Contact details.

Mansoorkhan T K

Freelance web designer & web developer, Kerala, India

WordPress, Codeigniter, Magento, Opencart, Joomla, PHP/MySQL, jQuery, json, Facebook, Twitter, Paypal, PayU, Ukash, Sagepay, Authorize.net


WP plugin from scratch

Recently I started a project in WordPress in which I needed to create few plugins. I had no idea where to start from. But searching the web for few minutes gave me plenty of information to boost me up. So here I will show you how to create a wordpress plugin from scratch.

First of all you must decide a unique name for your plugin beacause WordPress’s plugin directory contains a number of plugins and your name may conflict with that of others. So find a unique name:)

Lets name our plugin ‘AwesomeWP’. 
Here is the directory structure for our plugin: rootwp-contentpluginsAwesomeWPstart.php
Note that we have created a new directory ‘AwesomeWP’ for our plugin. Although you can place your plugin file directly under wp-contentplugins directory, but making a separate directory helps you managing your files in an elegant way.
Now open wp-contentpluginsAwesomeWPstart.php and write following lines in the file:


1234567891011<?php/*Plugin Name: AwesomeWPPlugin URI: http://webspeaks.in/Description: My first Awesome wordpress pluginVersion: 1.0Author: Arvind BhardwajAuthor URI: http://webspeaks.in/License: GPL*/?>

Go to wordpress admin > plugins and you will see the AwesomeWP listed there. Happy to see it? Hmmmm! Its the comment part in the header portion of file that helps WordPress finding you plugin.
Now lets add some functionality to our plugin as till now it does nothing. Add following lines to our start.php

12345add_action('init','awesome');function awesome(){ echo "WordPress is just Awesome!!";}

The ‘init’ is called when WordPress initializes. So we have called a function ‘awesome’ on initialization of our blog. Note that no braces are required during this function call. After activating the plugin you will see ‘WordPress is just Awesome!!’ printed on top of your page, means it works!

Modifying the Post:
WordPress provides us very powerful means to modify literally any part of the wordpress blog. Like we can change the outcome of the posts as to our desire by just adding following lines of code in our plugin file:

12345678add_filter('the_content', 'modifyPost'); function modifyPost($content){$signature = 'Have fun with plugins!';return $content.$signature;}

What actually happened here is that we applied a WordPress filter ‘the_content’ in our plugin. This hook is called when post is diplayed on frontend. So at the time of displaying post, we added our custom text below the post. Note that the content of our post is automatically made available in the callback function ‘modifyPost’ through the wordpress filter. This is the beauty of WordPress.
So we have learnt how to write our first WordPress plugin adn modify our posts through plugin. Happy coding:)

Complete Plugin File:

12345678910111213141516171819202122232425262728<?php/*Plugin Name: AwesomeWPPlugin URI: http://webspeaks.in/Description: My first Awesome wordpress pluginVersion: 1.0Author: Arvind BhardwajAuthor URI: http://webspeaks.in/License: GPL*/?><?phpadd_action('init','awesome');/*Called when WordPress Initializes*/function awesome(){ echo "WordPress is just Awesome!!";} add_filter('the_content', 'modifyPost');  /*This tells WordPress that every time it's going to display the content of a post or page, it            should run it through our modifyPost() function.*/function modifyPost($content){$signature = 'Have fun with plugins!';return $content.$signature;} ?>