Media upload default linking (change the attachment link to none in wordpress)

This procedure will work for image media default linking in wordpress......
Place this in your theme's functions.php file.
function mytheme_setup() {
 // Set default values for the upload media box
 update_option('image_default_align', 'center' );
 update_option('image_default_link_type', 'media' );
 update_option('image_default_size', 'large' );

}
add_action('after_setup_theme', 'mytheme_setup');
If you want the default link action to be none, then change this line
update_option('image_default_link_type', 'none' );
Hope this helps and good luck

How to make scroll to top ?

1, Place the javascript code inside head tag:
<script type="text/javascript">
   $(document).ready(function(){ 
   
   $(window).scroll(function(){
    if ($(this).scrollTop() > 100) {
     $('.scrollup').fadeIn();
    } else {
     $('.scrollup').fadeOut();
    }
   }); 
   
   $('.scrollup').click(function(){
    $("html, body").animate({ scrollTop: 0 }, 600);
    return false;
   });
 
  });
</script>


2, Place the style code in css file:

.scrollup
{
position:fixed;
display:none;
right:50px;bottom:100px;
}



3, Place the html code in footer just above the closing of body tag i.e before </body>

<a href="#" class="scrollup">image or text (scroll to top)</a>


How to make a custom widget area in wordpress?

First of all place this code in function.php file to register a widget. Make sure that this widget name is unique and different for each.
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => 'Extra Widgets',
'id' => 'extra-widgets',
'description' => 'The extra widgets for your website.',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}

after this, You can place this below code where you want to show the widget content:
<?php 
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Extra Widgets')) :
endif; ?>

How to check responsive website?

Open a website with <iframe>  attribute, you can fix height or width in this iframe  then  this  will get you the responsiveness of any website under the given iframe according width or height.

For Example:-

http://www.responsinator.com/

How to create a custom page template ?

Create a blank php document, then add the following code:

<?php
/*
Template Name: My Custom Page
*/?> 

How to create a child theme in wordpress?


  • Child Theme directory structure
    Create a directory in your themes directory to hold the child theme. The theme directory is wp-content/themes. You should name the directory without any space as part of the name, and it is common practice to use the name of the parent theme folder with “-child” appended to it. For example, if you are making a child of the twentythirteen theme, your folder name would be twentythirteen-child.
  • In the child theme directory, create a file called style.css. This is the only file required to make a child theme. The style sheet must start with the following lines:
/*
 Theme Name:     Twenty Thirteen Child
 Theme URI:      http://example.com/twenty-thirteen-child/
 Description:    Twenty Thirteen Child Theme
 Author:         John Doe
 Author URI:     http://example.com
 Template:       twentythirteen
 Version:        1.0.0
*/

@import url("../twentythirteen/style.css");

/* =Theme customization starts here
-------------------------------------------------------------- */

Seach bar is not working in woocommerce for products? ( just modify the code on search-form.php in wordpress)

Open search-form.php file in woocommerce template 

There are the  words in search scope that is 'product' 

and,  you just have to change it to 'posts'  see example below-
<?php global $woo_options; ?>
<div class="search_main">
<form method="get" class="searchform" action="<?php echo home_url( '/' ); ?>" >
<input type="text" class="field s" name="s" value="<?php _e( 'Search', 'woothemes' ); ?>" onfocus="if (this.value == '<?php _e( 'Search', 'woothemes' ); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search', 'woothemes' ); ?>';}" />

        <?php if ( isset( $woo_options['woo_header_search_scope'] ) && $woo_options['woo_header_search_scope'] == 'posts' && is_woocommerce_activated() ) { echo '<input type="hidden" name="post_type" value="post" />'; } ?>
        
<button type="submit" class="icon-search submit" name="submit" value="Search"></button>
    
</form>    
    <div class="fix"></div>
</div>

How to get particular user data in Wordpress?

<?php $user_info = get_userdata(1);
      $username = $user_info->user_login;
      $first_name = $user_info->first_name;
      $last_name = $user_info->last_name;
      echo "$first_name $last_name logs into her WordPress site with the user name of $username.";
?>
 You can go to http://codex.wordpress.org/Function_Reference/  for more detail....

How to get the current user info in wordpress?

<?php global $current_user;
      get_currentuserinfo();

      echo 'Username: ' . $current_user->user_login . "\n";
      echo 'User email: ' . $current_user->user_email . "\n";
      echo 'User first name: ' . $current_user->user_firstname . "\n";
      echo 'User last name: ' . $current_user->user_lastname . "\n";
      echo 'User display name: ' . $current_user->display_name . "\n";
      echo 'User ID: ' . $current_user->ID . "\n";
?>

oDesk CEO Learned 5 lessons from his first job read the linked article

oDesk CEO Gary Swart shares 5 valuable lessons he learned from his first job as a shoe salesperson.

What was your first job? What lessons did you learn from it?





http://www.linkedin.com/today/post/article/20131029100727-758147-my-first-job-it-all-started-with-selling-sneakers

Web Designing



Web design encompasses many different skills and disciplines in the production and maintenance of websites. The different areas of web design include web graphic design; interface design; authoring, including standardised code and proprietary software; user experience design; and search engine optimization. Often many individuals will work in teams covering different aspects of the design process, although some designers will cover them all.[1] The term web design is normally used to describe the design process relating to the front-end (client side) design of a website including writing mark up. Web design partially overlaps web engineering in the broader scope of web development. Web designers are expected to have an awareness of usability and if their role involves creating mark up then they are also expected to be up to date with web accessibility guidelines.