how to add top button in wordpress website

Adding top button link is always good for users of blog. This is good for SEO also and your blog became more seo friendly this way.

how to add top button in wordpress

You just need to add the following CSS code into style.css file.


#topbutton{display: block;border: 0;position: fixed;  bottom: 20px; right:0;

After this open your header.php file from your wordpress theme folder and after body just add following link code in that file.


<a name="top"></a>

After this open your footer.php file and at the end of body tag add following code in that file.


<a href="#top"><div id="topbutton">
bloginfo('template_directory'); ?>/images/top-button-wordpress.png" />
</a>

put following image in your wordpress theme’s images folder. Just right click and save the image and put that in your images folder.

You can change css as per your requirement. This article is written by purabtech.in. If you are having any dobuts then please write to me.

Your button link will look like as follows:

add top button in wordpress
add top button in wordpress

how to develop wordpress theme with 978 grid system

Earlier 960 grid system was very popular among the wordpress theme developers. But 960 grid system is becoming older. Now days 978 grid system is becoming very popular. So I decided to create wordpress theme with 978 grid system.

how to develop wordpress theme with 978 grid system

In this article I will tell you how to create the wordpress theme with 978 grid system. For this you dont need to the PHP or wordpress API knowledge. If you are having basic HTML and CSS knowledge then also you can easily create the wordpress theme with 978 grid system. Main advantage of creating wordpress theme with grid system is SEO. If you add the grid system in your wordpress theme then that will be helpful for SEO also.

  • Setup the local development environment and wordpress

For local wordpress theme development you need to install PHP, Mysql, apache on your computer or laptop.If you are using the windows then you can install wamp or xxamp server on your machine. If you are using Linux or Max then you need to install the PHP, Mysql, Apache to your PC.

After Server setup first install the wordpress to your local box. Then go to your wordpress installation folder. Go to WordPress root folder and open following folder.

wp-content->themes

Start developing new wordpress theme with 978 grid system.

  • Create new theme folder in themes folder. (you can keep name as per your choice. I kept grid978 name for my wordpress theme)
  • For creating wordpress theme following files need to be created in theme folder(for me in grid978 folder)

style.css – The main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.
index.php –  The main template. If your Theme provides its own templates, index.php must be present.
comments.php – The comments template.
single.php –  The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
page.php – the page template. Used when an individual Page is queried.
author.php – The author template. Used when an author is queried.
archive.php –  The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
search.php – The search results template. Used when a search is performed.
attachment.php –  Attachment template. Used when viewing a single attachment.
image.php – Image attachment template. Used when viewing a single image attachment. If not present, attachment.php will be used.

Or If you are not having knowlege of creating those files then you can download the empty wordpress theme or you can download wordpress framework. Check following article and download empty framework.

List of free wordpress theme frameworks for wordpress theme developer

I always like the Twenty ten wordpress theme. If you are not having good knowledge of CSS then you need to download this theme form following URL. After downloading copy paste the all the files in to your theme folder.

Twenty Ten

Or If you are having good knowledge of CSS then you can download the complete naked and blank wordpress theme from following URL: (I used the starkers wodpress framework)

http://starkerstheme.com/

  • Download the 978 grid system

Then go to following site and download the 978 grid system.

http://978.gs/

how to develop wordpress theme with 978 grid system
how to develop wordpress theme with 978 grid system

I downloaded the zip file called brothersroloff-978-Grid-System-9bea20f.zip file. I extracted the folder.The package comes with a lot of files. I just coped the 978 Templates\CS978.css file in my wordpress theme folder. I opened the file and copied css code into my theme style.php file.

  • Change your Theme name

Open your style.css file and put following code in that file.


/*
Theme Name:grid978
Theme URI:https://purabtech.in
Description:The completely 978 grid system ready wordpress theme (Based on Twenty Ten)
Version:1.0
Author:purabtech.in
Author URI:https://purabtech.in
Tags:wordpressapi, grid, 978 grid, 3 column, clean, basic
*/

you need to change the theme name and other information as per your choice.

Create Screenshot.png file with size on 400 width and 350 height and put that in your theme folder. Now if you check your theme in wordpress admin section. Your theme will be visible in wordpress admin section.

how to develop wordpress theme with 978 grid system
how to develop wordpress theme with 978 grid system
  • Use Reset CSS in style.css file

You need to use the following style code in your style.css file for applying the reset CSS.


html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td{background:transparent; border:0; margin:0; padding:0; vertical-align:baseline}
body{line-height:1}

h1, h2, h3, h4, h5, h6{clear:both; font-family:Helvetica,Arial,verdana,sans-serif}
ol, ul{list-style:none}
blockquote{quotes:none}
blockquote:before, blockquote:after{content:''; content:none}
del{text-decoration:line-through}
/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse; border-spacing:0}
a img{border:none}

If you taken the twenty ten theme as a base then you dont need to put reset css in that file.

  • Select your grid system and layout for your wordpress theme.

I planned the keep 390px as sidebar area and 558px as content area. For more information you can check following image.

how to develop wordpress theme with 978 grid system
how to develop wordpress theme with 978 grid system

Plan your layout for developing the wordpress theme with grid 978 system. I planned the following layout for creating the wordpress theme.

how to develop wordpress theme with 978 grid system
how to develop wordpress theme with 978 grid system
  • Start using the 978 grid system for building the theme

Note :In this tutorial I am given the whole wordpress theme files for download with all the assets. You can download the our grid978 wordpress theme and check the code.

For setting the main container. I first opened the header.php file and inserted the following code after the body tag.


<div class='layout-978'>

Then I opened the footer.php file and before wp_footer() function put the close div code.

  • Setting header and menu section using 978 grid system.

Open your header.php file and after ‘layout-978’ div put following code in file.


<div class='row header'>

// Here is all header and menu code

</div>

  • Setting footer section using 978 grid system.

Open your footer.php file and after ‘layout-978’ div put following code in file.


<div class='row footer'>

// Here is all footer code

</div>

  • Setting up the main content area and sidebar area with grid 978 system

Using following code you can set the main content area and sidebar.


<div class='row'>
<div class='col7'>
// Main content Area
// This block code used in loop.php, single.php and page.php file
</div>
<div class='col5'>
// Top Side bar Area
// This block code used in sidebar.php file
</div>
<div class='col5'>
// Main Side bar Area
// This block code used in sidebar.php file
<div class='col2'>
// Primary Side bar Area
// This block code used in sidebar.php file
</div>
<div class='col3'>
// Secondary Side bar Area
// This block code used in sidebar.php file
</div>
</div>

For this I used the header.php, footer.php, singe.php, page.php and sidebar.php file.

Note : In this tutorial I am given the whole wordpress theme files for download with all the assets. You can download the our grid978 wordpress theme and check the code.

  • Set the content width for your theme

Open your functions.php file and find the following code and replace it to


if ( ! isset( $content_width ) )
 $content_width = 558;

  • Set the menu with CSS style

For multilevel menu support you need to put the following code in to your style.css file.


/* =Menu
-------------------------------------------------------------- */
#access{display:block; float:left; background:#51011f; margin:0 auto; width:978px; border-bottom:1px solid #28000f}
#access .menu-header,
div.menu{font-size:14px; font-weight:bold; margin-left:0px; width:978px; text-shadow:1px 1px 1px #000}
#access .menu-header ul,
div.menu ul{list-style:none; margin:0}
#access .menu-header li,
div.menu li{float:left; position:relative}
#access a{color:#fff; display:block; line-height:34px; /*line-height:38px; */padding:0 10px; text-decoration:none}
#access ul ul{box-shadow:0px 3px 3px rgba(0,0,0,0.2); -moz-box-shadow:0px 3px 3px rgba(0,0,0,0.2); -webkit-box-shadow:0px 3px 3px rgba(0,0,0,0.2); display:none; position:absolute; top:34px; left:0; float:left; width:180px; z-index:99999}
#access ul ul li{min-width:180px}
#access ul ul ul{left:100%; top:0}
#access ul ul a{background:#51011f; line-height:1em; padding:10px; width:160px; height:auto; opacity:0.9; color:#fff}
#access li:hover >a,
#access ul ul:hover >a{color:#B8F01C}
#access ul li:hover >ul{display:block}
#access ul li.current_page_item >a,
#access ul li.current-menu-ancestor >a,
#access ul li.current-menu-item >a,
#access ul li.current-menu-parent >a{color:#fff; background:transparent url(images/arrow2.png) top center no-repeat}
#access ul ul li.current_page_item >a,
#access ul ul li.current-menu-ancestor >a,
#access ul ul li.current-menu-item >a,
#access ul ul li.current-menu-parent >a{color:#fff; background:#853E08}
* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover{color:#fff; background:#853E08}

You can change this code as per your wordpress design and colors.

  • Set the footer widget area

Open your functions.php file and find and replace the following code.

find before_widget section for footer section and add the div with class “col3”. I used the 222px grid size for footer widget section.

You can add this code in sidebar-footer.php file also. you just need to add the div with class “col3” before all widgets.

Your wordpress theme is completed with 978 grid system. You can change and add more styles to your wordpress theme as per your design and colors.

  • How theme is looking

After creating theme is looking as follows:

  • How to mange the widget section the grid978 wordpress theme.

If you check your wordpress admin area. Go to appearance->Widgets section. This will look as follows:

how to develop wordpress theme with 978 grid system
how to develop wordpress theme with 978 grid system

Apart from this you can mange the Menu, Background and header image from this wordpress theme.

You can download the complete source code here.

[viral-lock message=”Download Source Code Link is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

Download Source Code

[/viral-lock]

If you want to see the Demo of Grid978 wordpress theme then you need to check following URL:

[viral-lock message=”Download and Demo Link is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

Grid978 Theme Demo | Download

[/viral-lock]

This 978 gird system based free wordpress theme framework is created by purabtech.in. If you are having any doubts about developing wordpress theme with 978 grid system then you can write to me on wordpressapi@gmail.com

wordpress theme with 978 grid
wordpress theme with 978 grid

easily add google adsense through text widget wordpress

wordpress blogs and google ads is most common thing in blogs. Through google ads you can earn easily money. Many times many people search for how to place the google ads in wordpress sites. You do not need with wordpress plugin for showing the google ads. without wordpress plugin you can easily add the google ads in wordpress site.

easily add google Adsense through text widget wordpress

Some times they spend so much time for checking google Adsense ready wordpress themes. But I always prefer to use the text widget from wordpress widget section. Through text widget panel you can add the google ads to your wordpress sites. In this article, How easily add google Adsense through text widget wordpress.

First you need to login to your wordpress admin panel. Go to Apperance->widget section.

easily add google adsense through text widget wordpress
easily add google adsense through text widget wordpress

You will find text widget in that page. Just drag text widget to your sidebar section. putting the google ad in top sidebar section is good for earning good amount of money. Right top side you will find the arrow button, just click on that and put your google ad code in textarea.

I used following code. You can also use the following google ad code for testing purpose.


google_ad_client = "ca-pub-4949877136251097";
/* 300x250, created 6/20/10 */
google_ad_slot = "4364150141";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

In title section write “Sponsors” word and then click on save button as per shown in following image.

easily add google adsense through text widget wordpress
easily add google adsense through text widget wordpress

 

After this check your webpage. You can able to see your google ad on your wordpress site.I given the sample image. how your ad will be shown in wordpress site sidebar panel.

 

easily add google adsense through text widget wordpress
easily add google adsense through text widget wordpress

This tutorial is written by purabtech.in. If you are facing any issue then please write to me on wordpressapi@gmail.com

how to add post thumbnail on homepage in wordpress

Many times many wordpress blog and website users asked me about adding the post thumbnail on home page. Many people download the free themes from internet and they want to add the post thumbnail on homepage. In this tutorial I will tell you how to add post st thumbnail on homepage.

how to add post thumbnail on homepage in wordpress

First step open your functions.php file from wordpress theme folder and add following code in that file.


add_theme_support( 'post-thumbnails' );

Then open your index.php file and find the the_content or the_excerpt text. If you not find this text in this file then open your loop.php file from wordpress theme folder and find the_content or the_excerpt in that file. Before this tag you need to put following code in that file.


<div class="imgshadow"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(500,400), array('class' => 'imgshadowleft')); ?></a></div>

You need to specify your thumbnail size Here I chosen 500×400 size for me. Normally people choose the 150×150 or 200×200 size. After that use following css code for styling.

put following code in your style.css file.


.imgshadow{float:left; margin-right:5px}

How to set post thumbnail for home page?

Go to wordpress admin panel and create new post. you will find the “Featured Image” section bottom on right side panel. Click on “Set featured image” link.

how to add post thumbnail on homepage in wordpress
how to add post thumbnail on homepage in wordpress

Then you need to upload the image and you will find option called “use as featured image” link. Just click on that image. For help you can refer following image.

This way you can easily add the post thumbnail to your home page. For more information about wordpress thumbnail image you can read the following articles. In following you can got very detailed information about wordpress thumbnail and featured images.

Show Post Thumbnail or Featured image in WordPress RSS Feed

Add the Custom Thumbnail Size to wordpress

How to set post first image as featured image automatically

How to use the the_post_thumbnail In WordPress 3.0

show current authors post in wordpress admin panel

When you logged in to wordpress panel that time show only current authors post in wordpress admin panel. I got requirement to show only current users post in admin panel. Because is there are lot of users in wordpress then you need search for your posts.

show current authors post in wordpress admin panel

You just need to open the functions.php file from your wordpress theme folder and put following code in that file.


function posts_for_current_author($query) {
 global $pagenow;

 if( 'edit.php' != $pagenow || !$query->is_admin )
 return $query;

 if( !current_user_can( 'manage_options' ) ) {
 global $user_ID;
 $query->set('author', $user_ID );
 }
 return $query;
}
add_filter('pre_get_posts', 'posts_for_current_author');

show current authors post in wordpress admin panel
show current authors post in wordpress admin panel

Note: If you are wordpress developer then only use this step or you can ask to do changes to any wordpress developer. If you face any issue then please write to me on wordpressapi@gmail.com. This article is written by purabtech.in.

How to create contact us template page in wordpress

Dont use the plugins for contact us page in wordpress which will and unwanted code to your site.we given the simple code snippet for create contact us template page in wordpress.

create contact us template page in wordpress

Contact us page is important for every website. Many wordpress developers use the contact7 wordpress plugin for creating the contact page.

Dont use the plugins for contact us page in wordpress

If you use any contact us plugin then your site became little bit slow. because due to database custom quires you will some bandwidth.  My suggestion is use simple php code for that.

You need to just create the contact.php page in your wordpress theme folder and put the following code in that file.


<?php
/*
Template Name: Contact Us
*/
if($_POST[sent]){
 $error = "";
 if(!trim($_POST[your_name])){
 $error .= "<p>Please enter your name</p>";
 }
 if(!filter_var(trim($_POST[your_email]),FILTER_VALIDATE_EMAIL)){
 $error .= "<p>Please enter a valid email address</p>";
 }
 if(!trim($_POST[your_message])){
 $error .= "<p>Please enter a message</p>";
 }
 if(!trim($_POST[your_subject])){
 $error .= "<p>Please enter a message</p>";
 }
 if(!$error){
 $email = wp_mail(get_option("admin_email"),trim($_POST[your_name])." sent you a message from ".get_option("blogname"),stripslashes(trim($_POST[your_message])),"From: ".trim($_POST[your_name])." <".trim($_POST[your_email]).">\r\nReply-To:".trim($_POST[your_email]));
 }
}
?>
<?php get_header(); ?>

 <section id="primary">
 <div id="content" role="main">

<div id="archives">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
 <h1><?php the_title(); ?></h1>
 <div>
 <?php if($email){ ?>
 <p><strong>Message succesfully sent. I'll reply as soon as I can</strong></p>
 <?php } else { if($error) { ?>
 <p><strong>Your messange hasn't been sent</strong><p>
 <?php echo $error; ?>
 <?php } else { the_content(); } ?>
 <form action="<?php the_permalink(); ?>" id="contact_me" method="post">
 <input type="hidden" name="sent" id="sent" value="1" />
 <div id="form">
 <div id="lebel">Your Name (required)</div>
 <div id="input-field"><input type="text" name="your_name" id="your_name" value="<?php echo $_POST[your_name];?>" /></div>
 <div id="lebel">Your Email (required)</div>
 <div id="input-field"><input type="text" name="your_email" id="your_email" value="<?php echo $_POST[your_email];?>" /></div>
 <div id="lebel">Subject</div>
 <div id="input-field"><input type="text" name="your_subject" id="your_subject" value="<?php echo $_POST[your_subject];?>" /></div>
 <div id="lebel">Your Message(required)</div>
 <div id="input-field"><textarea name="your_message" id="your_message"><?php echo stripslashes($_POST[your_message]); ?></textarea></div>
 <div id="lebel"> </div>
 <div id="input-field"><input type="submit" name = "send" value = "Contact Us" /></div>
 </div>

 </form>
 <?php } ?>
 </div><!-- .entry-content -->
 </div><!-- #post-## -->
 <?php endwhile; ?>

</div>
 </div><!-- #content -->
 </section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

create contact us template page in wordpress
create contact us template page in wordpress

 

 

If you need more information about then check following articles.

https://purabtech.in/create-contact-page-wihout-wordpress-plugin/

https://purabtech.in/send-smtp-email-wordpress-plugin/

Send email to site users about new wordpress posts

For increasing traffic of website. It is good to send email to users about new post. we have script for Send email to site users about new wordpress posts.

There are many wordpress plugins available for sending email but I given small code for sending email to wordpress users without using any wordpress plugins

Send email to site users about new wordpress posts
Send email to site users about new wordpress posts

If you are wordpress developer then only use following code. Open your functions.php file from your theme and put following code in that file. Just copy and paste the following code on your functions.php file:

function send_email_users($post_ID)  {
    global $wpdb;
    $usersarray = $wpdb->get_results("SELECT user_email FROM $wpdb->users;");
    $users = implode(",", $usersarray);
    mail($users, "New Article is Published", 'A new article have been published on http://www.purabtech.in. Please visit');
    return $post_ID;
}
add_action('publish_post', 'send_email_users');

You just need to change my domain name to your domain name and put that in your functions.php file. If you are having any issues then Please write to me.
This wordpress hack, tip or trick written by wordpressapi.

Here is some very useful links for wordpress.

Check Following articles for great wordpress hacks of the all the time.

how to create contact us page without wordpress plugin
Add the extra new users details or fields to wordpress without plugin
Display wordpress Tags In A Dropdown Menu without plugin
How to change the Visual Editor Font Size wordpress without plugin
Display wordpress Tags In A Dropdown Menu without plugin
wordpress pagination style without wordpress plugin
show popular posts without wordpress plugin in theme
How to send smtp email through wordpress without plugin
How to put digg button in wordpress without plugin
Get the recent comments without using wordpress plugin or widget
How to Add the social Bookmar Icons in WordPress theme without wordpress plugins
How to exclude pages from wordpress menu without plugin
Show related posts with wordpress post without using any plugin

add custom fields to user profile wordpress without plugin

WordPress tutorial, add custom fields to user profile wordpress without plugin. For adding extra details use can use following sample code in functions.php file. You can modify the code as per your requirement.

add custom fields to user profile wordpress without plugin

add custom fields to user profile wordpress without plugin
add custom fields to user profile wordpress without plugin

Note: If you are not wordpress developer then you should ask any wordpress developer to do this changes.

add_action( 'show_user_profile', 'extra_fields_to_user' );
add_action( 'edit_user_profile', 'extra_fields_to_user' );

function extra_fields_to_user( $user ) { ?>

 <h3>Extra profile information</h3>

 <table>

 <tr>
 <th><label for="facebook">facebook</label></th>

 <td>
 <input type="text" name="facebook" id="facebook" value="<?php echo esc_attr( get_the_author_meta( 'facebook', $user->ID ) ); ?>" /><br />
 <span>Please enter your facebook username.</span>
 </td>
 </tr>

 </table>
<?php }
add_action( 'personal_options_update', 'extra_fields_to_user_save' );
add_action( 'edit_user_profile_update', 'extra_fields_to_user_save' );

function extra_fields_to_user_save( $user_id ) {

 if ( !current_user_can( 'edit_user', $user_id ) )
 return false;

 /* Copy and paste this line for additional fields. Make sure to change 'facebook' to the field ID. */
 update_usermeta( $user_id, 'facebook', $_POST['facebook'] );
}

showing the user information use following code.
<?php the_author_meta( ‘facebook’ ); ?>

how to display wordpress categories in a drop down menu

wordpress tutorial, how to display wordpress categories in a drop down menu. For showing the categories in drop down menu just use our following code.

how to display wordpress categories in a drop down menu

You just need to copy paste following code in put in functions.php file.


<li id="categories"><h2><?php _e('Posts by Category'); ?></h2>
 <?php wp_dropdown_categories('show_option_none=Select category'); ?>

<script type="text/javascript"><!--
 var dropdown = document.getElementById("cat");
 function onCatChange() {
 if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
 location.href = "<?php echo get_option('home');
?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
 }
 }
 dropdown.onchange = onCatChange;
--></script>
</li>

For more information you can use the following code.

how to display wordpress categories in a drop down menu
how to display wordpress categories in a drop down menu

Display wordpress Tags In Dropdown Menu without plugin

WordPress tutorial, Display wordpress Tags In Dropdown Menu without plugin. we given simple code here which you need to put in theme functions.php file.

If you want to display the tags in drop down menu then use following code in functions.php file.

Display wordpress Tags In Dropdown Menu without plugin


<?php
function dropdown_tag_cloud( $args = '' ) {
$defaults = array(
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
'exclude' => '', 'include' => ''
);
$args = wp_parse_args( $args, $defaults );

$tags = get_tags( array_merge($args, array('orderby' => 'count', 'order' => 'DESC')) ); // Always query top tags

if ( empty($tags) )
return;

$return = dropdown_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
if ( is_wp_error( $return ) )
return false;
else
echo apply_filters( 'dropdown_tag_cloud', $return, $args );
}

function dropdown_generate_tag_cloud( $tags, $args = '' ) {
global $wp_rewrite;
$defaults = array(
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC'
);
$args = wp_parse_args( $args, $defaults );
extract($args);

if ( !$tags )
return;
$counts = $tag_links = array();
foreach ( (array) $tags as $tag ) {
$counts[$tag->name] = $tag->count;
$tag_links[$tag->name] = get_tag_link( $tag->term_id );
if ( is_wp_error( $tag_links[$tag->name] ) )
return $tag_links[$tag->name];
$tag_ids[$tag->name] = $tag->term_id;
}

$min_count = min($counts);
$spread = max($counts) - $min_count;
if ( $spread <= 0 )
$spread = 1;
$font_spread = $largest - $smallest;
if ( $font_spread <= 0 )
$font_spread = 1;
$font_step = $font_spread / $spread;

// SQL cannot save you; this is a second (potentially different) sort on a subset of data.
if ( 'name' == $orderby )
uksort($counts, 'strnatcasecmp');
else
asort($counts);

if ( 'DESC' == $order )
$counts = array_reverse( $counts, true );

$a = array();

$rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : '';

foreach ( $counts as $tag => $count ) {
$tag_id = $tag_ids[$tag];
$tag_link = clean_url($tag_links[$tag]);
$tag = str_replace(' ', ' ', wp_specialchars( $tag ));
$a[] = "\t<option value='$tag_link'>$tag ($count)</option>";
}

switch ( $format ) :
case 'array' :
$return =& $a;
break;
case 'list' :
$return = "<ul class='wp-tag-cloud'>\n\t<li>";
$return .= join("</li>\n\t<li>", $a);
$return .= "</li>\n</ul>\n";
break;
default :
$return = join("\n", $a);
break;
endswitch;

return apply_filters( 'dropdown_generate_tag_cloud', $return, $tags, $args );
}
?>

In footer or sidebar file or where you want to display the tags in dropdown use the following code.

Display wordpress Tags In Dropdown Menu without plugin
Display wordpress Tags In Dropdown Menu without plugin

<select name="tag-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="#">Liste d'auteurs</option>
<?php dropdown_tag_cloud('number=0&order=asc'); ?>
</select>