How to Enable Google Analytics Ecommerce Tracking

How to enable Google Analytics Ecommerce Tracking Login to google analytics Account In Google Analytics Click on Admin In Left side Account panel select account In Middle Panel Select Property for which you want to enable google analytics ecommerce tracking In Third Panel Select View for which you want to enable google analytics ecommerce tracking Click on view settings Click

Read more

WordPress how to disable comments on particular post

WordPress how to disable comments for perticular post ? 1.Login to your WordPress admin panel. 2.Click on “Posts” left panel. 3.Now open post in edit mode for which you want to disable comments. 4.Click on “Screen Options” button on top right bar. 5.Checkmark on “Discussion” 6.Now you will see “Discussion” panel after your post editor. 7.Uncheck “Allow Comments” 8.Save post.

Read more

wordpress font size tag cloud

The default font size for wordpress tag cloud is not well formated for all wordpress theme.So how to change wordpress theme tag cloud fontsize.There is a filter for wordpress called “widget_tag_cloud_args” In this filter you can apply font-size and many more options for wordpress tag cloud.   What you have to do is add given code into your current theme’s

Read more

remove image link wordpress

By defualt when you add image from gallery the link also added to the image.A link to image can be remove easy writing small code into function.php or creating plugin. Here is code for how to remove links from images add_filter(‘the_content’, ‘remove_images_from_post_page’); function remove_images_from_post_page($content){ $content = preg_replace(‘/]*>]*)><\/a>/im’, ”, $content); return $content; } add_shortcode( ‘gallery’, ‘remove_images_links_gallery’ ); function remove_images_links_gallery($attr) { global

Read more

wordpress custom page

custom page is wordpress standalone page which is not use as wordpress page or page.there is some situation where you need custom page which will define owns html and js and othere elements using wordpress header and footer.This is very easy in wordpress to create cusom page.This wordpress custom page will depends on theme you are using.So some of customization

Read more

wordpress logout user

example <div ><a href=”<?php echo wp_logout_url( ); ?>” title=”Logout”>Logout</a></div> How to logout user using another way ? If you want to logout user own way then you can do using following code <?php require_once(‘wp-blog-header.php’);  // this is root file so adjust your pah accordingly   wp_clear_auth_cookie();  //this will logout user ?>  

Read more

wordpress physical installation path

Simply you can get wordpress physical installation path using ABSPATH Constant. require_once(‘wp-config.php’); echo ABSPATH;

Read more

wordpress how to check is post or page

How to check if the current request is for the post  ?   You can check if the current request is for for post using wordpress function is_singel(). Example is_single( ’17’ ) When Post 17 is being displayed as a single Post. is_single( ‘Irish Stew’ ) When the Post with Title “Irish Stew” is being displayed as a single Post.

Read more

wordpress get random post

You can get current wordpress category get_the_category function. Random Post Code <?php global $post; $categories = get_the_category($post->ID); $catId=$categories[0]->term_id;//wordpress current category ?> <ul> <?php $args = array( ‘numberposts’ => 5, ‘orderby’ => ‘rand’ ,’category’ =>$catId); $rand_posts = get_posts( $args ); foreach( $rand_posts as $post ) : ?> <li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endforeach; ?> </ul>  

Read more