I used the model dialog box, In that form I want to use the jquery form validation. code for Jquery form validation with modal dialog box with custom messages.
Jquery form validation with modal dialog box with custom messages
WordPress itself uses the jquery in all wordpress themes and loads automatically. But it is always good to load the jquery library through google CDN. It saves your sites bandwidth. Many people already written about same so here I am just putting the method.
Load jQuery library from Google CDN
Load the jQuery library from Google CDN is always good for seo and better performance of site. WordPress itself uses the jquery in all wordpress themes and loads automatically.
For more libraries you can visit the following URL:
https://developers.google.com/speed/libraries/devguide
What you need is, just copy and paste the following code into your functions.php file.
Many latest framework are loading all javascript in footer. They reduce the page loading the errors. But wordpress load the jquery and other javascript in header.
loading javascript libraries in footer will be always best for every web or mobile application. Here in this article, I will show to Load jQuery in wordpress footer section.
But using following code you can load your javascripts and jquery in footer area. You just need to copy and paste the following code into the functions.php file.
In every second wordpress sites we used the slider or slideshow. Sliders are very important in wordpress sites. There are many requirements about different types of sliders. Here I collected some very popular jquery wordpress slider plugins. Slider plugins are required in very second wordpress websites. I tested the following wordpress plugins and it found great features..
This is a highly customizable jQuery Slider plugin. You can set its width, height, pagination and other parameters. You can use it on your post or page using schortcode
The ‘JJ NextGen JQuery Slider’ allows you to create a ‘Nivo slider’ (http://nivo.dev7studios.com/) as a widget or as a shortcode. This plugin uses the ‘NextGen Gallery’ plugin for its images.
Promotion slider is a jQuery slider that makes it easy to insert a simple slideshow, or implement multiple rotating ad zones, on a webpage. Because it is highly-customizable, you are in complete control of what shows on the slider, what shows on your promotion pages and how it all works. A simple options page and straight-forward shortcodes provide great flexibility to the average user, while power users can take advantage of special actions and filters built into the plugin to add their own customizations.
WP Orbit Slider is based around the jQuery Orbit Slider from the excellent team Zurb. It uses a custom post type for each slide and taxonomies to create slider groups. The restriction is one slider per post/page. Dont fill your pages with sliders. Use one. Make it bold and get your message across!
The Simple Nivo Slider plugin provides easy access to Gilbert Pellegrom’s excellent jQuery-based Nivo Slider. The admin panel makes it easy to tweak the most commonly used Nivo Slider options from within WordPress.
Cyclone Slider 2 follows the keep it simple mantra. It leverages WordPress’ built-in features. It uses custom post for the slideshow, custom fields to store settings, and media uploader for the images. It also uses a template system that allows developers to easily customize the slideshow to their needs. Its simple yet flexible.
Features:
Very easy to use interface! Blends seamlessly with your WordPress workflow.
Supports image, video, and custom HTML slides.
Powered by Cycle 2, the most flexible jQuery slideshow plugin.
A template system that allows developers to easily customize the slideshows.
Customizable tile transition effects.
Ability to add per-slide transition effects.
Unlimited slideshows.
Unique settings for each slideshow.
Supports random slide order.
Shortcode for displaying slideshows anywhere in your site.
Ability to import images from NextGEN (NextGEN must be installed and active).
Ability to use qTranslate quick tags for slide title and descriptions (qTranslate must be installed and active).
Allows title and alt to be specified for each slide images.
Comes with a widget to display your slideshow easily in widget areas.
wordpress and jquery both are powerful tool. In plugin we need datepicker sometime. In this article i showed how to implement jquery UI datepicker in wordpress
implement jquery UI datepicker in wordpress
Some WP developers use the plugins to add the datepicker in wordpress. But you can add the Jquery datepicker in wordpress. How can use the Jquery UI in your wordpress theme and plugin using following code. For adding the datepicker in theme you need to just add the following code in functions.php file.
[viral-lock message=”Some Source code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]
When you enqueue your script, it enqueues for the whole site including admin panel. Using wordpress hook you can include jquery ui in wordpress website. If you don’t want the script in the admin panel, you can only include them for the site in frontend.
How to include jquery ui in wordpress
This following code you need to add in functions.php file.
Showing wordpress comment preview for comment box is always good for attracting the visitors. I shown code here for show the comments preview.
wordpress comment preview for comment box
Many times comments preview will be useful for visitors to see how comments will be looking. Using google Jquery or wordpress jquery you can add the comment preview to your wordpress blog. Showing comment preview is always good for attracting the visitors. Many clients demands for this. I shown you the example code over here for show the comments preview.
In this tutorial I am using the wordpress inbuild jquery. First open your header. php file from your theme folder and after head tag following code.
WordPress tutorial for, Create an Autocomplete Search Field in wordpress. In wordpress also you can easily achieve the auto complete search form easily.
Create an Autocomplete Search Field in wordpress
Now auto complete search box is very common for every web projects. Auto complete search functionality you can see in google also. In wordpress also you can easily achieve the auto complete search form easily.
Create an Ajax-based Auto complete Search Field in wordpress
There is very nice Jquery plugin for auto complete. First download the latest version of jQuery , as well as the autocomplete plugin. Now, create a folder in your theme called “javascripts” and copy paste the two files in that folder. Open your header.php from your wordpress theme folder and put following code in that file.
vardata = '<?php global $wpdb; $search_tags = $wpdb->get_results("SELECT name FROM $wpdb->terms"); foreach ($search_tags as $mytag){ echo $mytag->name. " "; } ?>'.split(" ");
7
$("#SEARCH_INPUT_BOX").autocomplete(data);
8
})
9
</script>
Just you need change the search input box id in place of SEARCH_INPUT_BOX.
If you are wordpress developer then only use the above code in header.php file. If you are facing any issue then please write to on support@purabtech.in.
Here are some very useful articles which are related to wordpress Search functionality.
For without refresh the data from home page if you want to show the pages and pagination in wordpress blog than you can use the following code for add ajax pagination in wordpress blog.
add ajax pagination in wordpress blog
With the help of jquery you can easily add the pagination wordpress blog site. You just need to add the following code into header.php file.
[viral-lock message=”Source code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]
I created many wordpress themes for various purpose and clients. Jquery is common requirement for all the project. That is for menu, slider or validation and for effects. In wordpress adding the Jquery is very easy because wordpress itself uses the Jquery for admin panel. They provided the wordpress api for adding the jquery in wordpress theme files.
smart way to use jquery in wordpress theme
wordpess developers are always looking for wordpress jquery plugin, wordpress include jquery, wordpress jquery ui, wordpress jquery noconflict, wordpress jquery theme, wordpress jquery version, wordpress jquery slider, wordpress jquery not working. Here is the solution
smart way to use jquery in wordpress theme
Following is the simplest way to add jquery in wordpress theme.You just need to use the following code in your wordpress theme functions.php file.