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
Category Archives: wordpress tutorials
What is Plugin API Hooks – solution for plugins are not working on wordpress theme
Whenever you developing the new theme. You need to add following code in your theme file. wp_head Goes in the HTML <head> element of a theme; header.php template. Example plugin use: add javascript code. Usage: <?php do_action(‘wp_head’); ?> -or- <?php … Continue reading
How to create simple wordpress theme
If you new to develop the wordpress theme then just use following steps to create the theme. For wordpress theme only two files are required. style.css index.php Only with these two files you are able to create the basic theme … Continue reading
Where to find wordpress apis
Here is the list of important links of worpdress api Plugin API http://codex.wordpress.org/Plugin_API XML-RPC Support http://codex.wordpress.org/XML-RPC_Support” API Keys for dashboard http://en.wordpress.com/api-keys/ This is api site of wordpress- uncomplete http://api.wordpress.org/
How to use conditional tags in WordPress themes and plugins.
How to check page is subpage or parent page. We got this particular requirement of wordpress menus. For that we need many times parent page menu and sub pages as submenu. Using following code we can able to find the … Continue reading
How to use conditional tags in WordPress themes and plugins
The Conditional Tags are most useful in creating the wordpress themes and plugins. The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending … Continue reading
How To Use Template Tags In WordPress Theme
What is meaning of a Template Tag in WordPress A template tag is code that instructs WordPress to “do” or “get” something. In the case of the header.php template tag for your WordPress site’s name, it looks like this: <?php … Continue reading
Functions.php file is important in wordpress theme
WordPress is most powerful tool for SEO and bloggers. We all need the custom theme for our projects. When we are creating the custom wordpress theme then functions.php file is so important. Here is the detailed information about functions.php file. … Continue reading
Basic CSS rules for development of WordPress themes
Whenever you are developing the new wordpress theme, you need to put some css in your style.css file. If you are not adding that css in your theme then there is lot of changes to break your theme view. Some … Continue reading