Thursday, August 19, 2010

Change post utility in your blog




You can see this part in every post footer, if you want to change it then you can find a function in the index.php in your theme folder. the function is "get_template_part( 'loop', 'index' ); "

this function body is located in "wp-includes/general-template.php" line 119

this function get the html architecture from "wp-content\themes\twentyten\loop.php"

if you change there the change will reflect in your blog.....

Wednesday, August 18, 2010

Create your customize sidebar in the blog frontend

This code will customize your sidebar in your blog theme you can get it in the sidebar.php


<div id="primary" class="widget-area" role="complementary">

<ul class="xoxo">

<?php/* When we call the dynamic_sidebar() function, it'll spit out
* the widgets for that widget area. If it instead returns false,
* then the sidebar simply doesn't exist, so we'll hard-code in
* some default sidebar stuff just in case.*/
//if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>

<!--<li id="search" class="widget-container widget_search">

<?php //get_search_form(); ?>


</li>
-->


<li id="archives" class="widget-container">


<h3 class="widget-title">
<?php _e( 'Recent Posts', 'twentyten' ); ?>
</h3>


<ul>


<?php wp_get_archives('title_li=&type=postbypost&limit=100'); ?>


</ul>


</li>



<li id="archives" class="widget-container">


<h3 class="widget-title">
<?php _e( 'Recent Comments', 'twentyten' ); ?>
</h3>


<ul>


<?php

foreach((get_comments(array('number' =>
30, 'status' =>
'approve'))) as $recent_comments){ ?>


<li>


<a href="<?php echo $recent_comments->
comment_author_url; ?>
">
<?php echo $recent_comments->
comment_author . ' '; ?>
</a>
On <?php $id = $recent_comments->
comment_post_ID; ?>
<a href="<?php echo get_post( $id, $output )->
guid; ?>
">
<?php echo get_post( $id, $output )->
post_title; ?>
</a>


</li>


<?php } ?>


</ul>


</li>



<li id="archives" class="widget-container">


<h3 class="widget-title">
<?php _e( 'Archives', 'twentyten' ); ?>
</h3>


<ul>


<?php wp_get_archives( 'type=monthly' ); ?>


</ul>


</li>



<!--<li id="archives" class="widget-container">


<h3 class="widget-title">
<?php _e( 'Categories', 'twentyten' ); ?>
</h3>


<ul>


<?php

foreach((get_the_category()) as $category) { ?>


<li>


<a href="<?php echo get_category_link( $category->
cat_ID ); ?>
">
<?php echo $category->
cat_name . ' '; ?>
</a>


</li>


<?php } ?>


</ul>


</li>
-->

<li id="meta" class="widget-container">


<h3 class="widget-title">
<?php _e( 'Meta', 'twentyten' ); ?>
</h3>


<ul>


<?php wp_register(); ?>


<li>
<?php wp_loginout(); ?>
</li>


<?php wp_meta(); ?>


</ul>


</li>


<?php //endif; // end primary widget area ?>


</ul>


</div>
<!-- #primary .widget-area -->


<?php

// A second sidebar for widgets, just because.

//if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>


<!--<div id="secondary" class="widget-area" role="complementary">


<ul class="xoxo">


<?php// dynamic_sidebar( 'secondary-widget-area' ); ?>


</ul>


</div>
-->

<!-- #secondary .widget-area -->
<?php //endif; ?>


Saturday, August 14, 2010

Change your Edit Comment page

Go to the "wp-admin\edit-form-comment.php" you can find all the div related to the design.
and the css are using "wp-admin\css\wp-admin.css", "wp-admin\css\global.css", "wp-admin\css\colors-fresh.css"





in the above picture you can see both are same but in the Approved there have a number in the second picture. It is a very small trick. if you want to do it go to the "wp-admin\edit-comments.php" line number 240. You can see this code
"'approved' => _n_noop('Approved', 'Approved')," now you replace this code with this
"'approved' => _n_noop('Approved (%s)', 'Approved (%s)'),"
you can see the change

Friday, August 13, 2010

Change your wordpress email sending, receiving address and content

If you want to change wordpress default sending address then go to the "wp-includes\pluggable.php" just change on line number 375 and 391 "$from_name" and "$from_email"

Thursday, August 12, 2010

Customize admin Add new post page

This page structure is very complex. if you want to change editor style and function then go to "wp-admin\edit-form-advanced.php" line no 271 "the_editor($post->post_content);" function which point "wp-includes/general-template.php" line 1777. if you want to edit media button then look on this function "do_action( 'media_buttons' );" line 1808 in 'general-template.php'

Wednesday, August 11, 2010

Change on Admin Dashboard

If you want to remove "Configure" from Recent Comments widgets then go to "wp-admin\includes\dashboard.php" line 133

Tuesday, August 10, 2010

Edit Comment Form

if you want to change the comment form then go to your "wp-content\themes\twentyten\comments.php"

you can find a part of code
this is point at "wp-includes\comment-template.php" line 1484