where put google ads in wordpress blogs for earning money

Through wordpress blogs you can earn a good amount of revenue. If you are having more than 1 lakh monthly visitors and more than 2 lakh then you can easily earn the more than $100 per month. Now many people putting the google ads in their website. You can put maximum 3 google ads in your webpage. Tips for where put google ads in wordpress.

where put google ads in wordpress blogs for earning money

For wordpress I going to tell you where to place the google ad in wordpress site or blogs. For this you need to follow some points.

where to put the google ads in wordpress blogs for earning more revenue or money
where to put the google ads in wordpress blogs for earning more revenue or money

1. Create the custom channel in google ad-sense with your website name and place of google ad

2. Edit your google ad link as per your website link so you will get more clicks.

3. Create the different sizes of google ads.

Where to put the google ad in wordpress blog.

Header

First option for adding google ads in wordpress is Header section. In right side of logo you can put the google ad. Or you can add the google ad after menu also. For this section you can use the 738×90 or 468×60 size ad. I recommend use the 738×90 size ad in this place.

In Post

After the title you can put the google tag. This is very effective place for adding the google Adsense. For this place you can choose the 300×250 google ad size.

Sidebar

In sidebar you can select the 300×250 size. Using text widget you can easily add the google ad in wordpress blog.

where put google ads in wordpress blogs for earning money
where put google ads in wordpress blogs for earning money

For more information about google ads in wordpress sites. Check following article.

How to add AdSense in wordpress site
How many google ads we can show single web page

add ajax pagination in wordpress blog

For without refresh the data from home page if you want to show the pages and pagination in wordpress blog than you can use the following code for add ajax pagination in wordpress blog.

add ajax pagination in wordpress blog

With the help of jquery you can easily add the pagination wordpress blog site. You just need to add the following code into header.php file.

[viral-lock message=”Source code 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.”]


<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php wp_enqueue_script('jquery'); ?>
<script>
jQuery(document).ready(function(){
 // ajax pagination
 jQuery('#wp_pagination a').live('click', function(){ // if not using wp_pagination, change this to correct ID
 var link = jQuery(this).attr('href');
 // #main is the ID of the outer div wrapping your posts
 jQuery('#main-container').html('<div><h2>Loading...</h2></div>');
 // #entries is the ID of the inner div wrapping your posts
 jQuery('#main-container').load(link+' #entries')
 });
}); // end ready function
</script>

[/viral-lock]

just put above code in header.php file in head section. Just make sure that you are putting above code after wp_head function.

add ajax pagination in wordpress blog
add ajax pagination in wordpress blog

If you are not wordpress developer then dont use following code and If you are facing any issue then write to me on support@purabtech.in

hide certain wordpress pages or posts from search

Some time you don’t want to come the some page and posts come in search. Here is very simple technique for excluding or removing the some wordpess pages or posts from wordpress search.

hide certain wordpress pages or posts from search

You just need to put following code in functions.php file. You will find this file in your wordpress theme folder. To work this idea you need to know about the page or post id which you want to exclude from search.

When you are creating the post that time you can get the wordpress post id Or while editing the post you will know the wordpress post or page id.


// search filter
function my_search_filter($query) {
 // make sure we are not in the admin and that we are performing a search
 if ( !$query->is_admin && $query->is_search) {
 $query->set('post__not_in', array(50, 10,32,68) ); // IDs of pages or posts
 }
 return $query;
}
add_filter( 'pre_get_posts', 'my_search_filter' );

hide certain wordpress pages or posts from search
hide certain wordpress pages or posts from search

separate custom template for each Author in wordpress

WordPress tutorial, separate custom template for each Author in wordpress. You can create different template for each wordpress author. You can also create different styling for each of wordpress authors. This is very common requiement of clients that they want different designed pages for each of wordpress users. That can be easily possible.

separate custom template for each Author in wordpress

You just need create author specific page template in wordpress theme. If author name is john then create author-john.php page in wordpress theme and put following code in that file.


<?php
/*
Template Name: John Author
*/
?>
<?php get_header(); ?>

<?php
 /* Queue the first post, that way we know who
 * the author is when we try to get their name,
 * URL, description, avatar, etc.
 *
 * We reset this later so we can run the loop
 * properly with a call to rewind_posts().
 */
 if ( have_posts() )
 the_post();
?>

&nbsp;

// If a user has filled out their description, show a bio on their entries.
if ( get_the_author_meta( 'description' ) ) : ?>
 <div id="entry-author-info">
 <div id="author-avatar">
 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'J2010_author_bio_avatar_size', 50 ) ); ?>
 </div><!-- #author-avatar -->
 <div id="author-description">
 <h2><?php printf( __( 'About %s', 'J2010' ), get_the_author() ); ?></h2>
 <?php the_author_meta( 'description' ); ?>
 </div><!-- #author-description&nbsp;&nbsp;&nbsp; -->
 </div><!-- #entry-author-info -->
<?php endif; ?>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

Dont forget to add your different style for each of author pages. Just go to pages and create page with name with your author name and choose the page template of your author name and save the page.

separate custom template for each Author in wordpress
separate custom template for each Author in wordpress

If you are knowing the author id then you can create the author-1.php page also and add your different style for each of your wordpress authors.

Create different post styling through CSS to your each of users. If you are having doubts and issues with styling or code then please contact me on purabtech.in. In purabtech.in you will found many use ful wordpress api, tutorials and hacks and articles.

Add different Editor Styles for Custom Post Types in WordPress

There is custom post type support added from wordpress 2.9 in wordpress. Many times we create the different types of post type in wordpress and show it i different way. We use the different styles for showing the content types..

Add different Editor Styles for Custom Post Types in WordPress

Add different Editor Styles for Custom Post Types in WordPress
Add different Editor Styles for Custom Post Types in WordPress

In wordpress we have the visual and html editor. For adding the different styles for custom post types just open your functions.php file put the following code in that file.


function my_editor_style() {
 global $current_screen;
 switch ($current_screen->post_type) {
 case 'post':
 add_editor_style('editor-style-post.css');
 break;
 case 'page':
 add_editor_style('editor-style-page.css');
 break;
 case 'product':
 add_editor_style('editor-style-product.css');
 break;
case 'shop':
 add_editor_style('editor-style-shop.css');
 break;

}
}
add_action( 'admin_head', 'my_editor_style' );

If you are not wordpress developer then dont use above code. In purabtech.in site you will find many wordpress tutorials and tips and hacks and plugins. Please write to me on support@purabtech.in

how to install wordpress on linux web server

WordPress tutorial, how to install wordpress on linux web server. Through Cpanal or downloading the zip from wordpress site and doing normal installation. But some times If you have VPS or your own linux server then you want to know about how to do the wordpress installation easily on Linux box.

how to install wordpress on linux web server

 

how to install wordpress on linux web server
how to install wordpress on linux web server

Just follow My steps:

If you have shell access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your web server using wget (or lynx or another console-based web browser) if you want to avoid FTPing:

  • wget http://wordpress.org/latest.tar.gz
  • Then unzip the package using:
    tar -xzvf latest.tar.gz

The WordPress package will extract into a folder called wordpress in the same directory that you downloaded latest.tar.gz.

Then Use the following Command.

#mv WORDPRESS YOURDOMAIN NAME

Than Open your apache configuration file and put following code in that file


<VirtualHost&nbsp; *:80>

ServerAdmin support@purabtech.in

DocumentRoot /var/www/html/YOURDOMAIN NAME

ServerName example.com

ServerAlias www.example.com

ErrorLog logs/YOURDOMAIN-error_log

CustomLog logs/YOURDOMAIN-access_log custom

</VirtualHost>

Than restart the apache server.

#/etc/init.d/httpd restart

Open your site in browser and do the installtion. But dont forget to create mysql database put correct information in wp-config.php file about database and username and password.

You are ready to go with your wordpress instillation with linux command prompt. This way you can do the local installation of wordpress on linux box.

How to add content after wordpress post editor

WordPress tutorial, How to add content after wordpress post. For unique identity of your blog you need to the some common words in every posts. If you want add some default text in wordpress editor.

How to add content after wordpress post editor

you can add following code in functions.php file.


add_filter( 'default_content', 'add_subscribe_in_editor_content' );

function add_subscribe_in_editor_content( $content ) {
 $content = "If you enjoyed this post, make sure to subscribe to <a href='http://feeds2.feedburner.com/wordpressapi' target='_blank'>my rss feed</a>.";
 return $content;
}

using above code subscribe code will be added in wordpress editor.

How to add content after wordpress post editor
How to add content after wordpress post editor

Here is some very useful articles which is useful for modify the wordpress editor.

Add Buttons to WordPress wysiwyg editor

How to hide the wordpress visual editor and HTML editor

How to change the Visual Editor Font Size wordpress without plugin

add different background image to each wordpress posts

WordPress tutorial, add different background image to each wordpress posts. You can change the background images for each wordpress post or change color.  you can change the background color also. Some times this can be doable through CSS also. But here I am going to give you very simple technique.

add different background image to each wordpress posts

Following code you just need to place in your single.php file.

 


if(is_single('17')){
// When Post 17 (ID) is being displayed.

echo "<style>
body{
background: #000 url(images/bgbody.jpg) top center no-repeat;
}</style>";
}

This way you can add the different background image to each wordperss post.

add different background image to each wordpress posts
add different background image to each wordpress posts

 

how to get random posts in wordpress

Wordpres tutorial, how to get random posts in wordpress. Many times we need the random post from wordpress. Like for old tweet or if you want random posts.  Like for old tweet or if you want to show random posts on home page. That is very easy wordpress provided simple method for this.

how to get random posts in wordpress

You just need to add the following query post code before loop.


 <?php query_posts(array('orderby' => 'rand')); ?>

//post data code will go here.

This way can easily show the random posts on home page.

Above is manual method for showing random posts in wordpress. If you want to show random posts using wordpress plugin than use smart widget post.

how to get random posts in wordpress

all share button wordpress code of all social sites

we given all share button wordpress code of all social sites. You not need to add any wordpress plugin for adding social buttons. Here all button code given.

For social networking and sharing your article many people use the different wordpress plugins. But When you use the wordpress plugin for sharing article that will fire extra mysql request to database. Sometime your site will became slow or stop functioning due to unwanted wordpress plugin.

all share button wordpress code of all social sites

I recommend not to use any wordpress plugin for sharing the article. You can use following code for sharing your article. You need to just add the following code in your wordpress theme files. just use following code in index.php or single.php file.

For Designfloat
http://www.designfloat.com/submit.php?url=[URL]&title=[title] 

For Blogger
http://www.blogger.com/blog_this.pyra?t=&u=[URL]&l&n=[title]

For RSS feed
[URL]/feed/

For google buzz
http://www.google.com/reader/link?url=[URL]&amp;title=[title]&amp;snippet=[desc]&amp;srcURL=[YOUR BLOG'S URL HERE]&amp;srcTitle=[YOUR BLOG'S NAME HERE]

For Linked In
http://www.linkedin.com/shareArticle?mini=true&url=[URL]&title=[title]&summary=[desc]&source=digcms

For Mixx
http://www.mixx.com/submit?page_url={url}&title={title}

For Netvibes
http://www.netvibes.com/share?title=[title]&url=[URL]

Twitter:

http://twitter.com/home?status=[title]+[URL]
Facebook:

http://www.facebook.com/share.php?u=[URL]&title=[title]
Digg:

http://www.digg.com/submit?phase=2&url=[URL]&title=[title]
Mixx:

http://www.mixx.com/submit?page_url=[URL]&title=[title]
Delicious:

http://del.icio.us/post?url=[URL]&title=[title]&notes=[desc]
Google:

http://www.google.com/bookmarks/mark?op=edit&bkmk=[URL]&title=[title]&annotation=[desc]
Design Bump:

http://www.designbump.com/node/add/drigg/?url=[URL]&title=[title]&body=[desc]
Design Moo:

http://www.designmoo.com/node/add/drigg/?url=[URL]&title=[title]&body=[desc]
Design Buzz:

http://buzz.yahoo.com/buzz?targetUrl=[URL]&headline=[title]&summary=[desc]
DZone:

http://dzone.com/links/add.html?url=[URL]&title=[title]&description=[desc]
Tumblr

http://www.tumblr.com/share?v=3&u=[url]&t=[title]&s=[description]
Email1:

mailto:?subject=[title]&amp;body=[URL]

Email2:

mailto:?subject=[title]&amp;body=[description]
StumbleUpon:

http://www.stumbleupon.com/submit?url=[URL]&title=[title]
Reddit:

http://www.reddit.com/submit?url=[URL]&title=[title]
Technorati:

http://technorati.com/faves?add=[URL]&title=[title]
Newsvine:

http://www.newsvine.com/_tools/seed&save?u=[url]&h=[title]
Sphinn:

http://sphinn.com/submit.php?url=[url]&title=[title]
Slashdot:

http://slashdot.org/bookmark.pl?title=[title]&url=[url]
Ping.fm:

http://ping.fm/ref/?link=[url]&title=[title]&body=[desc]
Evernote:

http://www.evernote.com/clip.action?url=[URL]&title=[title]
Friendfeed:

http://www.friendfeed.com/share?url=[URL]&title=[title]
Sphinn

http://sphinn.com/index.php?c=post&m=submit&link=[url]
Blinklist

http://www.blinklist.com/index.php?Action=Blink/Addblink.php&Url=[url]&Title=[title]
Fark

http://cgi.fark.com/cgi/fark/farkit.pl?u=[url]&h=[title]
Propeller

http://www.propeller.com/submit/?url=[url]
Netvouz

http://www.netvouz.com/action/submitBookmark?url=[url]&title=[title]&popup=no
ShpereIt

http://www.sphere.com/search?q=sphereit:[url]&title=[title]
Live

https://favorites.live.com/quickadd.aspx?marklet=1&url=[url]&title=[title]
Myspace

http://www.myspace.com/Modules/PostTo/Pages/?u=[url]&t=[title]
Slashdot

http://slashdot.org/bookmark.pl?url=[url]&title=[title]

You just need to use the following code instead of [url]


<?php the_permalink(); ?>

For description use following code.


<?php the_excerpt();

For Title use following code.


<?php the_title(); ?>

I used above code in digcms.com. You can check that on that site.

This will reduce you database queries.

all share button wordpress code of all social sites
all share button wordpress code of all social sites