game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online

how to add extra filed in user profile page

Adding Extra Fields to the WordPress User Profile or how to add extra filed in user profile page
WordPress offers some great options and function.There are some fileds in the user’s profile page where user can add info like bio but if admin want to provide more option or extra field to user than something write in code. today i am displaying or adding Extra Fields to the WordPress User Profile or how to add extra filed in user profile page Continue reading this entry…

how to call plugins in post

See here i am giving you an example to develop a wordpress plugins and calling it in post.Means creating a wordpress plugins and allowing option to use it in wordpress post.

  1. ShortCode API
    1. What is ShortCode API?

                         Shortcode API, a simple set of functions for creating macro codes for use in post content.

                          Example: [demo id=“1”]

                                    Is able to retrieve a demo record of ID 1 and embed the results into the post content Continue reading this entry…

Developing Plugins For WordPress





Developing Plugins For WordPress

  1. DEVELOPING PLUGINS FOR WORDPRESS
  2. Agenda
    1. Introduction
    2. Developing Plugin
    3. WP API: Filters/Hooks
    4. Plugin Path
    5. Plugin Details
    6. Inserting CSS/Javascript
    7. Modifying Content
    8. Translating Plugin Text To Other Languages
    9. Shortcode API
    10. Activating The Plugin
    11. WP-Polls, WP-PostRatings, WP-PostViews, WP-Print, WP-Email, WP-Useronline, etc
  3. Continue reading this entry…

how to configure wp tag cloud manually





how to configure wp tag cloud manually

Well, here is the concept of the tag cloud:

Usage

<?php wp_tag_cloud( $args ); ?>

Default Usage

<?php $args = array(
‘smallest’  => 8,
‘largest’   => 22,
‘unit’      => ‘pt’,
‘number’    => 45,
‘format’    => ‘flat’,
‘separator’ => ‘\n’,
‘orderby’   => ‘name’,
‘order’     => ‘ASC’,
‘exclude’   => ,
‘include’   => ,
‘link’      => ‘view’,
‘taxonomy’  => ‘post_tag’,
‘echo’      => true ); ?>

By default, the usage shows: Continue reading this entry…

how to list all post of a category wordpress plugings





Hi every body mrphpguru here agian.

I am written this artical to list all post of a category wordpress plugings.

Now please open the archive page of the theam.

now just select the are where you want to display all the list of the post of a category.

<div id=”post_ran”>
<div>
<h2>List of post under </h2>
</div>
<div></div>
<?php
// Declare some helper vars
$previous_year = $year = 0;
$previous_month = $month = 0;
$ul_open = false;
// Get the posts
$myposts = get_posts(‘numberposts=10&orderby=post_date&order=DESC’);
?>
<?php foreach($myposts as $post) : ?>
<?php
// Setup the post variables
setup_postdata($post);
$year = mysql2date(‘Y’, $post->post_date);
$month = mysql2date(‘n’, $post->post_date);
$day = mysql2date(‘j’, $post->post_date);
?>
<?php if($year != $previous_year || $month != $previous_month) : ?>
<div>
<div><?php the_time(‘M’); ?></div>
<div><?php the_time(‘d’); ?></div>
</div>
<?php endif; ?>
<?php $previous_year = $year; $previous_month = $month; ?>
<div>
<h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>
<div>
Posted by <?php the_author() ?> under <?php the_category(‘, ‘) ?> <?php edit_post_link(‘Edit’, ‘| ‘, ”); ?>
</div>
</div>
<div></div>
<?php endforeach; ?>
</ul>
</div>

<div id=”post_ran”> <div> <h2>List of post under </h2> </div> <div></div> <?php  // Declare some helper vars $previous_year = $year = 0; $previous_month = $month = 0; $ul_open = false;   // Get the posts $myposts = get_posts(‘numberposts=10&orderby=post_date&order=DESC’);   ?>   <?php foreach($myposts as $post) : ?>   <?php   // Setup the post variables setup_postdata($post);   $year = mysql2date(‘Y’, $post->post_date); $month = mysql2date(‘n’, $post->post_date); $day = mysql2date(‘j’, $post->post_date);   ?>   <?php if($year != $previous_year || $month != $previous_month) : ?>     <div> <div><?php the_time(‘M’); ?></div> <div><?php the_time(‘d’); ?></div> </div>       <?php endif; ?>   <?php $previous_year = $year; $previous_month = $month; ?>   <div> <h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <div>Posted by <?php the_author() ?> under <?php the_category(‘, ‘) ?> <?php edit_post_link(‘Edit’, ‘| ‘, ”); ?> </div> </div> <div></div> <?php endforeach; ?> </ul> </div>

in the above code you can controll the number of post by changing  numberposts=10

$myposts = get_posts(‘numberposts=10&orderby=post_date&order=DESC’);

numberposts=10 means it will display 10 post title

-1 will display all..

thanks

mrphpguru

display total number of comments and category in wordpress blog



Hi i am wrting post to display number of comments and number of categories in wordpress blog it is very simple

<?php
$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcomms) $numcomms = number_format($numcomms);

$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories");
if (0 < $numcats) $numcats = number_format($numcats);
?>
<p><?php printf(__('There are currently %3$s <a href="%4$s" title="Comments">comments</a>, 
?>
Thanks
mrphpguru


Display the Total Number of WordPress Posts

Hi everybody today i will write post to display number of post in wordpress

I am not writing a plugin in for wordpress to display number of post in wordpress

<?php
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
if (0 < $numposts) $numposts = number_format($numposts);
?>
<p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>
?>

Above code will be use for lesser version 2.5

For greater than 2.5  there is inbuilt function in wordpress

http://codex.wordpress.org/Function_Reference/wp_count_posts

<?php wp_count_posts('type'); ?>
<?php wp_count_posts('type', 'readable'); ?>

The default usage returns a count of the posts that are published. This will be an object, you can var_dump() the contents to debug the output.

<?php
$count_posts = wp_count_posts();
?>

Get the Publish Status Post Count

To get the published status type, you would call the wp_count_posts() function and then access the 'publish' property.
<?php
$count_posts = wp_count_posts();

$published_posts = $count_posts->publish;
?>
or
<?php
$published_posts = wp_count_posts()->publish;
?>
source:worpress

thanks
mrphpguru