Posts

useful functions for wordpress

//*******woocomerce>>>>>>>>// /*****cart item and amount*****/  <div class="cart-icon col-sm-4">  <?php global $woocommerce; ?>  <a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>">  <?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?>  <?php echo $woocommerce->cart->get_cart_total(); ?></a> <a href="<?php echo get_permalink( 67 ) ;?>">  <i class="fa fa-shopping-cart"></i></a>  </div> //category post per page (function.php, shows 24 products)// add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 ); /////...

Why people focus on the right-hand side of a design

Image
           Website users instinctively have greater trust for content on the right-hand side, says UX designer Chris Da Sie. In Western culture, we've always been told to design left to right to help guide users. We read left to right so we should position the most important content and elements in our designs to where a user's eye is going to look first. But let me ask you: by designing this way are users trusting the information you are providing? Are we getting the most interaction out of our users that we possibly can? I would argue no. They are finding information and clicking on links because they have been trained to do so, not because of trust or emotional connections to our products. These days there is a lot of talk about emotional design and how to properly create a connection between users and our products. Focusing on the right-hand side of our designs can create these connections. We have the...

Cordova and Android SDK installing on Windows 7 and 8 for Hybrid Mobile Apps Development

Image
1: Download and Install Java Download and install a recent release of the Java SDK for your computer. You should be able to open a new instance of cmd.exe and run java without problems. If not (you made sure to open a new cmd window, right?), then open your system environment variables, and add to or create a new user variable called PATH with the full path to the bin folder of the new Java SDK installation. 2: Download Apache Ant Apache Ant is needed by Android and Cordova for building projects. Download and extract this zip file somewhere on your computer: http://mirror.tcpdiag.net/apache//ant/binaries/apache-ant-1.9.4-bin.zip Add the full path to the bin/ folder to the end of your PATH environment variable. 3: Download the Android SDK Go and download the And...

How Display Content on a Custom Page in WordPress

<?php $recent = new WP_Query("page_id=159"); while($recent->have_posts()) : $recent->the_post();?> <!-- 159 is Page ID  --> - - - -  - - - - - - - - - - - - - - - - -  <?php $recent = new WP_Query("page_id=**ID**"); while($recent->have_posts()) : $recent->the_post();?>        <h3><?php the_title(); ?></h3>        <?php the_content(); ?> <?php endwhile; ?>

How to Highlight the active navbar link with jQuery in Twitter Bootstrap .

<script>     jQuery(document).ready(function () {         var url = window.location;         jQuery('ul.nav a[href="'+ url +'"]').parent().addClass('active');         jQuery('ul.nav a').filter(function() {              return this.href == url;         }).parent().addClass('active');     }); </script>

How to get Filezilla Quickconnect History

C:\Users\<USER_PC>\AppData\Roaming\FileZilla - Edit the file called " recentservers.xml " and edit /remove the <Server> elements you want

How to add class based on active URL in PHP and in jQuery

//Past into Header <?php $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $page_class =explode('/',$actual_link); ?> <body class="<?=end($page_class);?>"> ================= jQuery ============== <script> $(function() {   var loc = window.location.pathname; // returns the full URL var split_loc = loc.split('/'); active_loc = split_loc[split_loc.length-1]; $('body').addClass(active_loc + "-page"); }); </script>