You need to create random.php page in your template. In that page just copy paste the following code: <?php query_posts(array(‘orderby’ => ‘rand’, ‘showposts’ => 1)); if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></h1> <?php … Continue reading
Monthly Archives: January 2009
How to add the flash intro in wordpress sites
Follow my steps to create flash intro in wordpress sites. 1. Create file named intro.php and just copy paste following code <?php /* Template Name: intro */ if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile; endif; ?> 2. Upload … Continue reading
Php Mysql Question and Answers for Interview
What is the difference between PHP4 and PHP5? PHP4 cannot support oops concepts and Zend engine 1 is used. PHP5 supports oops concepts and Zend engine 2 is used. Error supporting is increased in PHP5. XML and SQLLite will is … Continue reading
Important mysql quries
Taking backup of all mysql databases >mysqldump -uroot -p –all-databases >> all_database_dump.sql; for single database mysqldump -uroot -p public_wordpressmu wp_1_posts > one.sql database import from sql file mysql –verbose -uroot -p public_wordpressmu wp_1_posts < one.sql Creating Trigger create trigger DROP … Continue reading