WP Plugin: Latest Posts by Category Archive

I have found one plugin for one of my client project . That is latest posts by category. I thought someone would be looking for that kind of plug in like me. That plug in can show posts from categories. Posts can be limit how many post what you would like to show under categories.

Features of “Latest Posts by Category Archive

  • Can be used via hard-coding inside page templates;
  • Can be used as a widget in your widget-ready areas;
  • Can be used via shortcodes inside pages’ or posts’ content;
  • Can be used either inside or outside the loop;
  • Can limit the archive to certain categories, or exclude certain categories;
  • Can display or hide post dates;
  • Can display or hide post excerpts and adjust their length in words;
  • Can set the number of listed post from 1 to ‘all’.

To Download

Output XML using PHP from MySQL database

Firstly, Let me talk about this post. If your advance level php programmer, this is a piece of cake for you. I would like to say this post for beginner level. It would be a little difficult for a beginner. You may need xml output when you want to integrate with flash and MySQL records such as photo gallery, playlist for flash mp3 player, RSS Feeds, and so on.

Read More »

PHP Pagination

I have look for php pagination source. I got one very nice source code from Stranger Studio. That very nice code if your have a lot of records. You can see at sample preview.

PHP Pagination

However, this is a lot of lines in the file. If you want to put into a lot of pages, all of code you need to put into those pages. We have to take care about this. That’s while I have changed to class and functions. That’s very easy to use. I will share it back.

Read More »

How to parse xml in php?

When I started and learn php programming language. I have wanted to get data from xml file and read with php. I searched with Google. I got a lot of source codes. Some of codes are working in my local machine but when I upload and test it. It doesn’t work. I have found some codes are work with almost all of server. I will share it back.

Read More »

Useful WordPress Hacks

Show related post without a plugin

If you want to show related post in you current post , you can use simple way to show. You just need to copy and paste under following codes into single.php file of your theme. This code will display related posts based on the current post tag(s). It must be pasted within the loop.


<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
 echo 'Related Posts';
 $first_tag = $tags[0]->term_id;
 $args=array(
 'tag__in' => array($first_tag),
 'post__not_in' => array($post->ID),
 'showposts'=>5,
 'caller_get_posts'=>1
 );
 $my_query = new WP_Query($args);
 if( $my_query->have_posts() ) {
 while ($my_query->have_posts()) : $my_query->the_post(); ?>
 <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
 <?php
 endwhile;
 }
}
?>

source : How to: Show related posts without a plugin

Read More »

Page 1 of 3123»

Categories