Google Buzz Button – WordPress plugin free Download

In this we are going to give you the good news about google buzz feature is now wordpress blogger can include in their blogs. Just download the our new Google Buzz Button plugin.

Using this Google Buzz plugin you are able add the Google Buzz button in your post and excerpt.
The Google Buzz button easily allows your blog to be shared. You can customize the CSS as per your requirement. Google Buzz has admin panel which will give you the more control.

 

This plugin has nice admin panel. Using that admin panel you can configure the setting of button.

 

Download Plugin : Google Buzz Button

Official Link : http://wordpress.org/extend/plugins/google-buzz-button/

Note: Please do vote for my plugin on wordpress plugin site as works…

How to schedule events in wordpress

As we all know cron job can be scheduled in linux systems. So scheduling the any job in wordpress is easy because scheduling the events in wordpress is provided by wordpress itself.

How to schedule events in wordpress

How to schedule events in wordpress
How to schedule events in wordpress

WordPress provides the following functions to schedule the events.

wp_schedule_event(); //using this method you can schedule events.

You can pass following parameters to this method.

wp_schedule_event(time(), ‘hourly’, ‘your_event’);

Following params you need to pass to this method.

$timestamp
(integer) (required) The first time that you want the event to occur. This must be in a UNIX timestamp format.

Default: None

$recurrance
(string) (required) How often the event should reoccur. Valid values:

* hourly
* twicedaily
* daily

Default: None

$hook
(string) (required) The name of an action hook to execute.

Default: None

$args
(array) (optional) Arguments to pass to the hook function(s).

Default: None

You can Schedule an hourly event. Example as follows:

register_activation_hook(__FILE__, ‘my_activation’);
add_action(‘my_hourly_event’, ‘do_this_hourly’);

function my_activation() {
wp_schedule_event(time(), ‘hourly’, ‘my_hourly_event’);
}

function do_this_hourly() {
// do something every hour
}

Don’t forget to clean the scheduler on deactivation:

register_deactivation_hook(__FILE__, ‘my_deactivation’);

function my_deactivation() {
wp_clear_scheduled_hook(‘my_hourly_event’);
}

Now I am going to tell you how to extend the wp_schedule_event().
We can add the more recurrences adding following code.

function ten_minute_reccurences() {
return array(
‘ten_minute_reccurences’ => array(‘interval’ => 60*10, ‘display’ => ‘Once in Ten Mintues’),
);
}
add_filter(‘cron_schedules’, ‘ten_minute_reccurences’);

If you want check this recurrences added to wp_schedule_event or not. You need to just use following code to print recurrences

php print_r(wp_get_schedules());  ?>

I found useful following URLs.

http://codex.wordpress.org/Function_Reference/wp_schedule_event
http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
http://codex.wordpress.org/Plugin_API

If you have PHP knowledge than you should open wp-includes/cron.php file. This file has best information and methods about scheduler.

How to customize read more for every wordpress post

So many clients had requirement about customize read more link for every post. Tutorial for, How to customize read more for every wordpress post.

So achieving this functionality in easiest way is following.

Just add following code in your functions.php file.


<?php
//The Query
query_posts('posts_per_page=1');

//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();

global $post;
$thePostID = $post->ID;
$custom_read_more = get_post_meta($post->ID, 'custom_read_more', true);

if ($custom_read_more) {
add_post_meta($thePostID, 'custom_read_more', 'You need to read this article');  //custom read more value
}

endwhile;
endif;
?>
customize read more for every wordpress post
customize read more for every wordpress post

Now you are set to use the custom read more value for each post. You need to just copy paste the following code in your index.php and page.php and single.php file.

<?php $custom_read_more = get_post_meta($post->ID, 'custom_read_more', true); ?>

<?php if (!$custom_read_more) { $custommore = 'Read More &raquo;'; } ?>

<?php the_content($custom_read_more); ?>

How to add Meta box to wordpress admin post page

This article will tell you about, How to add Meta box to wordpress admin post and page.Use following code and create wordpressapi.php file and upload this file to wp-content/plugins/ folder.


<?php
/*
Plugin Name:  WordPressapi Meta Box
Plugin URI: http://images.purabtech.in/
Description: Adding the Meta box to admin panel -> post
Version: 0.0
Author: WordPressapi
Author URI: http://images.purabtech.in/
*/

function wordpressapi_meta_box() {
add_meta_box(
'wordpressapi',
'Wordpressapi Box', //Meta box title
'write_in_meta_box',
'post' // You can define here where to add the Meta box(post, page, link)
);
}

function write_in_meta_box(){
echo "Wordpressapi is writing something in admin meta box";
}

if (is_admin())
add_action('admin_menu', 'wordpressapi_meta_box');
?>
add Meta box to wordpress admin
add Meta box to wordpress admin

Go to your Plugin tab and activate the “WordPressapi Meta Box” plugin.
After activating the plugin you are able to see the Meta box on post page.

How to create or add new tables using wordpress theme

With custom professional theme you need to add the custom table in wordpress database, Using this code you can, add new tables using wordpress theme

add new tables using wordpress theme

If you want to add one more table to wordpress database you need to just use the following code.

Open the functions.php file and copy paste the code.

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


$wordpressapi_db_version = "1.0";

global $wpdb;
global $wordpressapi_db_version;

$table_name = $wpdb->prefix . "liveshoutbox";
if($wpdb->get_var("show tables like '$table_name'") != $table_name) {

$sql = "CREATE TABLE " . $table_name . " (
id mediumint(9) NOT NULL AUTO_INCREMENT,
time bigint(11) DEFAULT '0' NOT NULL,
name tinytext NOT NULL,
text text NOT NULL,
url VARCHAR(55) NOT NULL,
UNIQUE KEY id (id)
);";

require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);

$welcome_name = "Mr. WordPress";
$welcome_text = "Congratulations, you just completed the installation!";

$insert = "INSERT INTO " . $table_name .
" (time, name, text) " .
"VALUES ('" . time() . "','" . $wpdb->escape($welcome_name) . "','" . $wpdb->escape($welcome_text) . "')";

$results = $wpdb->query( $insert );

add_option("wordpressapi_db_version", $wordpressapi_db_version);

}

[/viral-lock]

register_activation_hook(__FILE__,'YOUR_FUNCTION_NAME');
add new tables using wordpress theme
add new tables using wordpress theme

How to exclude pages from wordpress menu without plugin

In this tutorial we will show you How to exclude pages from wordpress menu without plugin. We given simple code for adding to your theme file which will remove pages from menu.

How to exclude pages from wordpress menu without plugin

Normally when we are creating wordpress theme for showing the pages we code as follows

<?php wp_page_menu('show_home=1&amp;menu_class=page-navi&amp;sort_column=menu_order'); ?>
How to exclude pages from wordpress menu without plugin
How to exclude pages from wordpress menu without plugin

As per this code all pages will get displayed in menu. For showing selected pages check the page id.

and then use following code.

<?php 
wp_page_menu('show_home=1&amp;exclude=5,9,23&amp;menu_class=page-navi&amp;sort_column=menu_order'); 
?>

You are able to see the I added the exclude parameter in wordpress method.
Your selected page id for excluding from menu, you need to just put there with comma separated.

Put this code in your header.php file for showing the menu. You are able to exclude the pages from wordpress menu

add selected pages in wordpress menu

In this tutorial I will show you how to show the only selected pages in menu. add selected pages in wordpress menu using our code sample. which can be added.

add selected pages in wordpress menu

add selected pages in wordpress menu
add selected pages in wordpress menu

Normally when we are creating wordpress theme for showing the pages we code as follows

<?php 
wp_page_menu('show_home=1&amp;menu_class=page-navi&amp;sort_column=menu_order'); 
?>

As per this code all pages will get displayed in menu. For showing selected pages check the page id.

and then use following code.

<?php
 wp_page_menu('show_home=1&amp;include=5,9,23&amp;menu_class=page-navi&amp;sort_column=menu_order'); 
?>

You are able to see the I added the include parameter in wordpress method. Your selected page id you need to just put there with comma separated.

Put this code in your header.php file for showing the menu. Only selected pages will be shown on wordpress menu.

wordpress get child pages of current page

Using following code you can able to display the subpages of parent page. Tutorial for wordpress get child pages of current page. We have given code sample in this article.

<?php $subpages = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); ?>

<?php if ($subpages) { ?>
<ul>
<?php echo $subpages; ?>
</ul>
<?php } ?>

Note: This code you need to copy paste in loop only.

Using following code you can able to display the subpages and subpages of that.

<?php
if($post->post_parent)
$subpages = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
else
$subpages = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
if ($subpages) { ?>
<ul>
<?php echo $subpages; ?>
</ul>
<?php } ?>

Using css you modify the UI of menu.

wordpress get child pages of current page
wordpress get child pages of current page

More details you can found on following page
http://codex.wordpress.org/Template_Tags/wp_list_pages

How to use is_page conditional in wordpress

Many people some another content or code need to add in specific pages. WordPress tutorial for, How to use is_page conditional in wordpress.

use is_page conditional in wordpress

How to use is_page conditional in wordpress
How to use is_page conditional in wordpress

In that senorio use should use the is_page condition in page.php file. This file you will find in active wordpress theme folder.

You can use is_page condition in multiple way. Following are the some examples

is_page();
// When any single Page is being displayed.

is_page(42);
// When Page 42 (ID) is being displayed.

is_page(‘Contact’);
// When the Page with a post_title of “Contact” is being displayed.

is_page(‘about-me’);
// When the Page with a post_name (slug) of “about-me” is being displayed.

is_page(array(42,’about-me’,’Contact’));
// Returns true when the Pages displayed is either post ID 42, or post_name “about-me”, or post_title

Note: You can use above condition in only page.php file.

Text wrapping around image in wordpress theme

Many people do not care about what CSS they are putting for p tag and div tag. Text wrapping around image in wordpress theme. So far they are not able to use wordpress default functionality of text wrapping around the image.

Text wrapping around image

wordpress-logo-cristal_thumbnail-300x300
I am suggesting use following CSS in your wordpress theme whenever you are creating the new theme. You can do care about your theme preview but with that keep an eye you are not breaking the default CSS of wordpress.

Use following CSS in your wordpress theme and you will be able to use wordpress text wrapping around the image for your wordpress theme.

/* wordpress’s default CSS */
/* Begin Images */
p img {
padding: 0;
max-width: 100%;
}

/* Using ‘class=”alignright”‘ on an image will (who would’ve
thought?!) align the image to the right. And using ‘class=”centered’,
will of course center the image. This is much better than using
align=”center”, being much more futureproof (and valid) */

img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}

img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}

img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}

.alignright {
float: right;
}

.alignleft {
float: left;
}
/* End Images */
/* Captions */
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}

.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}

.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}

.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
/* End captions */

wplogo-notext-rgb

Note: Dot not assign p tag globally to body tag, Use p tag alignment tag as per your custom theme requirement.