Add Google translate to wordpress without plugin

Add Google translate to wordpress without plugin

If you want to add Google translate functionality to your wordpress site without using a plugin, here are the steps: header.php <ul class=”top-menu translation-links”> <li><a href=”#” class=”English language” data-lang=”English”>ENGLISH</a></li> <li><a href=”#” class=”Spanish” data-lang=”Spanish”>ESPAÑOL</a></li> <li><a href=”#” class=”French” data-lang=”French”>FRANÇAIS</a></li> <li><a href=”#” class=”Arabic” data-lang=”Arabic”>ARABIC</a></li> </ul> footer.php <?php function icw_googleTranslate_js() { ?> <!– Code provided by Google –> <div 

Continue Reading →

 

SMART STICKY – 10 JQUERY PLUGINS

onScreen onScreen is jQuery plugin lets you perform functions as an element is entering, leaving or reaching certain positions with the browser viewport. It’s dependent on jQuery and is licensed under the MIT license.   Headroom.js This extremely lightweight and high-performance JavaScript widget (no dependencies!) lets you react to the user’s scroll. It slides out 

Continue Reading →

SCSS – SASS – LESS Syntax Highlighting On Dreamweaver CS6 – Windows Only

SCSS – SASS – LESS Syntax Highlighting On Dreamweaver CS6 – Windows Only

1.       Update to the latest version of Dreamweaver 2.       Ensure that ‘Show hidden files’ is enabled in Control Panel > Folder options 3.       Open your user folder eg C:\users\Dylan\ replacing with your name 4.       Then open AppData/Roaming/Adobe/Dreamweaver CS6/en_US/Configuration/ 5.       Open the file Extensions.txt 6.       Replace the first line with the following: HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,JSON,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP, ASA,ASPX,ASCX,ASMX,CONFIG,CS,CSS,LESS,SCSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,PHP-DIST,PHTML,JSP,WML,TPL, LASSO,JSF,VB,VBS,VTM,VTML,INC,SQL,JAVA,EDML,MASTER,INFO,INSTALL,THEME,CONFIG,MODULE,PROFILE,ENGINE, SVG:All 

Continue Reading →

WooCommerce Products Custom Fields

WooCommerce Products Custom Fields

The right hooks The first step is to hook an action to woocommerce_product_options_general_product_data. The function linked to this hook will be responsible of the new fields display. A second hook will be taken into account to save fields values: woocommerce_process_product_meta. Basically these two actions will be done using that code: // Display Fields add_action( ‘woocommerce_product_options_general_product_data’, ‘woo_add_custom_general_fields’ ); 

Continue Reading →

Disable update notification for individual plugins

Disable update notification for individual plugins

For example if you don’t want WordPress to show update notifications for akismet, you will do it like:   function filter_plugin_updates( $value ) { unset( $value->response[‘akismet/akismet.php’] ); return $value; } add_filter( ‘site_transient_update_plugins’, ‘filter_plugin_updates’ ); //remove update notice for forked plugins function remove_update_notifications($value) { if ( isset( $value ) && is_object( $value ) ) { unset($value->response[ 

Continue Reading →

 

jQuery Validator Minimum Required Words

Function to get the live word count, excluding the spaces at the end (simply splitting will count say word (note the space at the end) as 2 words. 1) function getWordCount(wordString) { var words = wordString.split(” “); words = words.filter(function(words) { return words.length > 0 }).length; return words; } //add the custom validation method jQuery.validator.addMethod(“wordCount”, 

Continue Reading →

 

Custom RSS Template for WordPress

reating a custom RSS template is pretty easy. I’ll show you have to do it in 3 steps. 1) Register the template Place the following into functions.php <?php add_action( ‘after_setup_theme’, ‘my_rss_template’ ); /** * Register custom RSS template. */ function my_rss_template() { add_feed( ‘short’, ‘my_custom_rss_render’ ); } /** * Custom RSS template callback. */ function 

Continue Reading →

Using data attributes and CSS :before and :after for making clean, dynamic content

Using data attributes and CSS :before and :after for making clean, dynamic content

Data attributes are all the rage these days and work wonders with JavaScript integration but they can also work well with CSS. With basically one HTML element you can build something with many dynamic parts such as: <div class=”classname” data-city=”Surat” data-hwy=”Valsad”></div> This gives you one empty div with two data attributes attached holding what could 

Continue Reading →

Full Slider by Start Bootstrap

Full Slider by Start Bootstrap

I found an answer on the startbootstrap.com . Try this code: CSS html, body { height: 100%; } .carousel, .item, .active { height: 100%; } .carousel-inner { height: 100%; } /* Background images are set within the HTML using inline CSS, not here */ .fill { width: 100%; height: 100%; background-position: center; -webkit-background-size: cover; -moz-background-size: 

Continue Reading →

 

wp_unregister and wp_enqueue

Right, to correctly use a different jQuery source we need to remove the local version and introduce our new version to WordPress. We quite like the idea of using the protocol savvy, minified, Googlefied version, here’s the code, pop this in your functions.php file: function load_jquery() { // only use this method is we’re not 

Continue Reading →

WordPress custom breadcrumbs without plugin

WordPress custom breadcrumbs without plugin

Breadcrumbs are the important part of our website, in wordpress there are several plugins are available for this, but below i posted the code for custom breadcrumbs for our wordpress site. Just add this below code in to your current wordpress theme functions.php and call the second step. Step 1 <?php //breadcrumb if( !function_exists(‘increativeweb_breadcrumb’)){ function 

Continue Reading →

WordPress Most Popular Tricks

WordPress Most Popular Tricks

WordPress most popular tricks collection of easy-to-use, copy-&-paste WordPress tricks. Enjoy! 🙂 Table of Contents WordPress Shortcodes WordPress Permalinks Outside of the Loop Custom Message to Returning Visitors Recently Updated Posts and Pages Custom Content to Search Engine Visitors Last Modified Time and Date for Posts Display Total Number of Trackbacks and Pingbacks Display Recently Registered Users 

Continue Reading →