Tuesday, December 23, 2014

Some important tools of wordPress

How to dynamic WordPress search option:

<form action="<?php echo home_url(); ?>/" method="post" role="form" class="pull-right search-form col-xs-12 col-sm-3" id="searchform">
                            <div class="form-group">
                               
                                    <input type="text" class="form-control" id="search-form" placeholder="To search type and hit enter" value="<?php esc_attr_e( 'Search', 'brightpage' ); ?>" name="s" id="s" onfocus="if (this.value == '<?php esc_attr_e( 'Search', 'brightpage' ); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php esc_attr_e( 'Search', 'brightpage' ); ?>';}" />
                                    <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Go', 'brightpage' ); ?>" />
                            </div>
</form>

how to active dynamic breadcrumbs in WordPress:
firstly copy below this code and paste where you want to breadcrumbs:

<div class="breadcumbs">
                            <?php if (function_exists('wordpress_breadcrumbs')) wordpress_breadcrumbs(); ?></div>

Next you copy below this code and paste function.php:

<?php
function wordpress_breadcrumbs() {

  $delimiter = '&raquo;';
  $name = 'Home'; //text for the 'Home' link
  $currentBefore = '<span class="current">';
  $currentAfter = '</span>';

  if ( !is_home() && !is_front_page() || is_paged() ) {

    echo '<div id="crumbs">';

    global $post;
    $home = get_bloginfo('url');
    echo '<a href="' . $home . '">' . $name . '</a> ' . $delimiter . ' ';

    if ( is_category() ) {
      global $wp_query;
      $cat_obj = $wp_query->get_queried_object();
      $thisCat = $cat_obj->term_id;
      $thisCat = get_category($thisCat);
      $parentCat = get_category($thisCat->parent);
      if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));
      echo $currentBefore . 'Archive by category &#39;';
      single_cat_title();
      echo '&#39;' . $currentAfter;

    } elseif ( is_day() ) {
      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
      echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' ';
      echo $currentBefore . get_the_time('d') . $currentAfter;

    } elseif ( is_month() ) {
      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
      echo $currentBefore . get_the_time('F') . $currentAfter;

    } elseif ( is_year() ) {
      echo $currentBefore . get_the_time('Y') . $currentAfter;

    } elseif ( is_single() ) {
      $cat = get_the_category(); $cat = $cat[0];
      echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
      echo $currentBefore;
      the_title();
      echo $currentAfter;

    } elseif ( is_page() && !$post->post_parent ) {
      echo $currentBefore;
      the_title();
      echo $currentAfter;

    } elseif ( is_page() && $post->post_parent ) {
      $parent_id  = $post->post_parent;
      $breadcrumbs = array();
      while ($parent_id) {
        $page = get_page($parent_id);
        $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
        $parent_id  = $page->post_parent;
      }
      $breadcrumbs = array_reverse($breadcrumbs);
      foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';
      echo $currentBefore;
      the_title();
      echo $currentAfter;

    } elseif ( is_search() ) {
      echo $currentBefore . 'Search results for &#39;' . get_search_query() . '&#39;' . $currentAfter;

    } elseif ( is_tag() ) {
      echo $currentBefore . 'Posts tagged &#39;';
      single_tag_title();
      echo '&#39;' . $currentAfter;

    } elseif ( is_author() ) {
       global $author;
      $userdata = get_userdata($author);
      echo $currentBefore . 'Articles posted by ' . $userdata->display_name . $currentAfter;

    } elseif ( is_404() ) {
      echo $currentBefore . 'Error 404' . $currentAfter;
    }

    if ( get_query_var('paged') ) {
      if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
      echo __('Page') . ' ' . get_query_var('paged');
      if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
    }

    echo '</div>';

  }
}

?>

How you can active post-loop.php in wordpress:

<?php if(have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>   
        <div class="">.........some content......</div>
                       
    <?php endwhile; ?>   
<?php endif; ?>

What kinds of work odesk done

What kinds of work can you get done?
You can do any things on your computer – from a web development and software development can done project on odesk. You can get job –
Big or small
Short
Individual and team-based
How odesk hire a the right freelancer?
Finding the right person odesk firstly your skills and previous job history. If have no previous job history ,they knock freelancer cover latter and portfolio project. With also
Work history and education
Portfolio project and job related samples
Previous client rating and comments
Language and communications skills
After you will full fill such requirement then odesk hired you.
How does odesk payment for work?

Payment of freelancer will be choice by freelancer. Odesk support
Credit card
PayPal
Bank account
Pay freelancer budget per hour or per job, you choose. oDesk only gets paid once work begins. Odesk  receive 10% of each payment. For example, if you pay your freelancer $40, they earn $38 and odesk receive $4. Odesk also provide your hourly job you can use time-tracker for hourly job. For this you can relax from your client. Client can see your running project screen shot time to time. So client and buyer are go to a good relation by a project.You can create a company by odesk. When huge of project will be coming to you ,you can create your company to do your project. To create  a company account ,every member of your company should be include in odesk company account.
What’s feature of odesk?
Odesk stored client and contractor information
  Odesk support your balance information
  You can view your own profile,client profile and other freelancer profile.
By odesk you can withdraw  your  job application
By odesk you can save any job

Popular market place in present world



There are various market place and way to earn money for online. Such odesk, elance, fiverr and people per hour etc. Then you also earn money Google  absence for  your free blog and your paid blog and website. Paid blog or website  means when you  buy domain and hosting where you blogging with your unique content. As well as you earn money form your website to display add form local and virtual . Any way now we will discuss about market place.

Odesk: Odesk is one of the market place in present world. Thousand of thousand job will be post in a day. You can proposal a job and biting  a job form home and any place where internet connect is ababile  .1+ million businesses are using  oDesk for top quality talent  work. There are various kinds  of job are posting in a day. Such as

Web Developme
Mobile Development
Web design
Software Development 
Article writer
Sales and Marketing
Customer Service

Some rules and regulation of odesk:
Odesk does not support fake account.Odesk does not support many account in a same name. Odesk want a unique information for contractor and client. Uncompleted  proposal will not granted by odesk.Odesk will not responsibility if any buyer cheat with you. Odesk charge fee form freelancer and buyer.
Elance:Elance is also one the market place in present World. 106508+ jobs is posted in a month. Elance is a market place where business go to find, hire pay leading freelancers form more that 182 countries. With a community 3 million freelancers and 1 million business to hire a top freelancers .You can  find Software application developers, software engineers, web developer, network administrators, web designers, graphic designers, article writers, copywriters, market researchers, SEO experts, data analysts, social media marketers, translators, customer service agents, moderators, administrative assistants, accountants, lawyers and business consultants.

If you will work form your house and any place, elance is the right place for you. So join us and success to do your project. Now you create a account

Fiverr:Fiverr is one kinds of market place. Where you can account form any country. Most of the job in fiverr is related gig system. A gig is $5. When you apply job you will be hired by gig. In fiverr you can not show your proposal a job. You should create a gig to get job. If any buyer will choice this, then you can hired. So you can create a account  .

Some rules and regulation of fiverr:
 Fiverr does not support fake account. It want a unique information related account.You do not many account form one computer.Fiverr does  not supports url in your profile and in your gig.
 Fiverr does not support unresponsive client.

Some question's answer about odesk



Many many question will be grow in odesk , elance and other market place.This type question is very important but it is easy to manage and answer.OK come to the point the answer such growing odesk question.

What is application fom?

Odesk provide limited application for client and contractor. You can  apply your application from limited application form. Your application will be exist with in a week. After a week you can apply another application form before. Firstly when you registration on odesk you will get 2 application form. After when you pass some exam and test and fulfill  odesk requirement .You will get 20 job application form to apply job. So I suggest after complete odesk profile 100% then you should apply odesk job.

What kinds of skills you add your profile?

Suppose you are web developer, you should choice HTML, CSS, PHP, MYSQL, SQL, JavaScript, JQuery, Photoshop, Bootstrap, WordPress etc . You can select your skills with 10. So firstly you desired what kinds of skill will be suit for you. Then you should exam your such skill. For this you will be go forward to get a job.

What kinds of description you add your overview or your CV?

Firstly you will try to introduce about you. Then you explain your qualification. Nextly you will describe your skill or working area…….such as WordPress Theme Development, Dynamic Website Design etc. Then you will thanks comment and finish your CV.

What kinds of item you add your cover latter?
Every cover latter should be unique. A good and unique cover latter will be increase possibility to get job. Every cover latter you will try to describe your qualification. Cover latter will not be edited after submit. So be aware to submit cover latter.
Awareness for Cover latter:
Every cover latter has clean text. Any format will not execute such as bold, italic, heading, hyperlink etc. Any formatting tag such as HTML, BBCode, Wiki etc will not used. Then you will display link so you will follow odesk click able link.  You can not write your address such as phone number, email and Skype id. So odesk will force you. Then  after massage form buyer you can  give your address.Starting point of cover latter firstly you will write “Dear hiring Manager or Hi, Dear his name” not Dear sir. Cover latter will not coy and paste. Cover latter will be related your job description. For this you can be hired easily.You can not forced ,request, pray for job to buyer in cover latter. Such kinds of cover latter is not suitable for you.ou will want upfront payment for  fixed budget job. For this you do not face any  risk.
Thanks all    

Monday, December 22, 2014

WordPressc single page, archive page and 404 page

To enable comment: 

functions.php function comment_scripts(){
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'comment_scripts' ); 
To enable featured image: 

functions.php 

add_theme_support( 'post-thumbnails', array( 'post' ) ); 

To enable crop feature: 

functions.php

set_post_thumbnail_size( 200, 200, true );
add_image_size( 'post-image', 150, 150, true ); 

Using Featured Image:

functions.php

add_theme_support( 'post-thumbnails', array( 'post' ) ); 
<?php the_post_thumbnail('post-general-thumb', array('class' => 'img-responsive ')); ?>

single.php in WordPress:

<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php _e('404 Error: Not Found'); ?>
<?php endif; ?> 

archive.php in WordPress:

for Archive & Archive Post List

  <h1>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<?php _e('Archive for the'); ?> '< ?php echo single_cat_title(); ?>' < ?php _e('Category'); ?>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<?php _e('Archive for the'); ?> < ?php single_tag_title(); ?> Tag
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<?php _e('Archive for'); ?> < ?php the_time('F jS, Y'); ?>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<?php _e('Archive for'); ?> < ?php the_time('F, Y'); ?>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<?php _e('Archive for'); ?> < ?php the_time('Y'); ?>
<?php /* If this is a search */ } elseif (is_search()) { ?>
<?php _e('Search Results'); ?>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<?php _e('Author Archive'); ?>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<?php _e('Blog Archives'); ?>
<?php } ?>

For archive post query: <?php get_template_part( 'post-excerpt' ); // Post Excerpt (post-excerpt.php) ?>  

If no post in archive or 404:

<?php else : ?> <h3>< ?php _e('404 Error: Not Found'); ?>
<?php endif; ?>  

404.php in WordPress:

<h2>404 Error: Not Found
<p>Sorry, but the page you are trying to reach is unavailable or does not exist.< /p > 

 Post Query in index.php:

<?php if(have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
       <div class="some">...............</div>
<?php endwhile; ?>
<?php endif; ?> 

Pagination in index.php:

<div class="nav-previous">
<?php next_posts_link( __( '< span class="meta-nav">← Older posts') ); ?>
</div>< div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→') ); ?>
  </div>  

Activate Option Tree: 

functions.php

add_filter( 'ot_show_pages', '__return_false' );
add_filter( 'ot_show_new_layout', '__return_false' );
add_filter( 'ot_theme_mode', '__return_true' );
include_once( 'option-tree/ot-loader.php' );
include_once( 'includes/theme-options.php' ); 

 Some important tools:

<?php the_permalink(); ?>=link dynamic