Articles tagged with: wordpress
Unfortunately, in_category doesn’t understand category child-parent relationships. If, for example, category 11 (bananas) is a child of category 2 (fruits), in_category(‘2′) will return FALSE when viewing post about bananas.
So if you want the same text to be applied to the category AND all its sub-categories, you’ll have to list them all. Syntax like in_category(2,11) is not allowed. You’ll have to use PHP || (logical OR) && (logical AND) in the expression.
Using the code given here you can display five posts in random order on your WordPress Site.
About the format you can adjust as you like, the number of posts is set by numberposts=5
<?php $rand_posts = get_posts(‘numberposts=5&orderby=rand’);
foreach( $rand_posts as $post ) :
setup_postdata($post); ?>
<a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a>
<?php the_excerpt() ?>
<?php endforeach; ?>
The full story about hi, display some random posts in WordPress
Came across this mysterious cell phone about a month back, and all we get to see was a X-ray pix of it. Now, they finally get to see more pictures of the Celsius X VI II micro-mechanical toubilon mobile phone. The phone will be unveiled next week at Baselworld 2010. read more...
Mercedes benz SL500 sale SL 500Japanese car exporter read more...
DVD A Team The CompleteJust found this over the Internet and it sure brings me back to the 80s! And the complete series is now available for pre-order at Amazon, where else? The actual release date will be June 8, 2010. read more...
WordPress com Get a FreeFree blogs managed by the developers of the WordPress software. Includes custom design templates, integrated statistics, automatic spam protection and other features. read more...
WordPressSemantic personal publishing platform with a focus on aesthetics, web standards, and usability. Software and documentation to get you started on your blog. read more...
WordPress com
