Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:MichaelH/Testing

Author related tags

Test values for the Template Tag the_author(). Place in wp-content/themes/default/index.php after the line that begins with:
<p class="postmetadata">Posted in <?php the_category(', ') ?>...
<p>Displaying values for the_author</p>
<p>This should display the_author() (default display_name): <?php the_author(); ?></p>
<p>This should display the_author('nickname'): <?php the_author('nickname'); ?></p>
<p>This should display the_author('login'): <?php the_author('login'); ?></p>
<p>This should display the_author('firstname'): <?php the_author('firstname'); ?></p>
<p>This should display the_author('lastname'): <?php the_author('lastname'); ?></p>
<p>This should display the_author('namefl') (firstname lastname): <?php the_author('namefl'); ?></p>
<p>This should display the_author('namelf') (lastname firstname): <?php the_author('namelf'); ?></p>
<p>Echoing values for the_author</p>
<p>This should echo the_author('') (default display_name): <?php echo the_author('',0); ?></p>
<p>This should echo the_author('nickname'): <?php echo the_author('nickname',0); ?></p>
<p>This should echo the_author('login'): <?php echo the_author('login',0); ?></p>
<p>This should echo the_author('firstname'): <?php echo the_author('firstname',0); ?></p>
<p>This should echo the_author('lastname'): <?php echo the_author('lastname',0); ?></p>
<p>This should echo the_author('namefl') (firstname lastname): <?php echo the_author('namefl',0); ?></p>
<p>This should echo the_author('namelf') (lastname firstname): <?php echo the_author('namelf',0); ?></p>

Test values for

Place in wp-content/themes/default/index.php after the line that begins with:
<p class="postmetadata">Posted in <?php the_category(', ') ?>...
<p>This is 'the_author_description' (About yourself): <?php the_author_description(); ?></p>
<p>This is 'the_author_login': <?php the_author_login(); ?></p>
<p>This is 'the_author_firstname': <?php the_author_firstname(); ?></p>
<p>This is 'the_author_lastname': <?php the_author_lastname(); ?></p>
<p>This is 'the_author_nickname': <?php the_author_nickname(); ?></p>
<p>This is 'the_author_ID': <?php the_author_ID(); ?></p>
<p>This is 'the_author_email': <?php the_author_email(); ?></p>
<p>This is 'the_author_url': <?php the_author_url(); ?></p>
<p>This is 'the_author_icq': <?php the_author_icq(); ?></p>
<p>This is 'the_author_aim': <?php the_author_aim(); ?></p>
<p>This is 'the_author_yim': <?php the_author_yim(); ?></p>
<p>This is 'the_author_msn': <?php the_author_msn(); ?></p>
<p>This is 'the_author_posts' (number): <?php the_author_posts(); ?></p>
Test values for the Template Tag the_author_posts_link(). Place in wp-content/themes/default/index.php after the line that begins with:
<p class="postmetadata">Posted in <?php the_category(', ') ?>...
<p>-Displaying values for the_author_posts_link-</p>
<p>This is 'the_author_posts_link() (default display_name)': <?php the_author_posts_link(); ?></p>
<p>This is 'the_author_posts_link('nickname')': <?php the_author_posts_link('nickname'); ?></p>
<p>This is 'the_author_posts_link('login')': <?php the_author_posts_link('login'); ?></p>
<p>This is 'the_author_posts_link('firstname')': <?php the_author_posts_link('firstname'); ?></p>
<p>This is 'the_author_posts_link('lastname')': <?php the_author_posts_link('lastname'); ?></p>
<p>This is 'the_author_posts_link('namefl')': <?php the_author_posts_link('namefl'); ?></p>
<p>This is 'the_author_posts_link('namelf')': <?php the_author_posts_link('namelf'); ?></p>

get_bloginfo and bloginfo

Test values for the Template Tags get_bloginfo() and bloginfo() . Place in wp-content/themes/default/index.php after the line:
<?php endif; ?>
<?php echo 'url: ' . get_bloginfo ( 'url'  );  ?> <br />
<?php echo 'home: ' . get_bloginfo ( 'home'  );  ?> <br />
<?php echo 'siteurt: ' . get_bloginfo ( 'siteurl'  );  ?> <br />
<?php echo 'wpurl: ' . get_bloginfo ( 'wpurl'  );  ?> <br />
<?php echo 'description: ' . get_bloginfo ( 'description' );  ?> <br />
<?php echo 'rdf_url: ' . get_bloginfo ( 'rdf_url' );  ?> <br />
<?php echo 'rss_url: ' . get_bloginfo ( 'rss_url' );  ?> <br />
<?php echo 'rss2_url: ' . get_bloginfo ( 'rss2_url' );  ?> <br />
<?php echo 'atom_url: ' . get_bloginfo ( 'atom_url' );  ?> <br />
<?php echo 'comments_rss2_url: ' . get_bloginfo ( 'comments_rss2_url' );  ?> <br />
<?php echo 'pingback_url: ' . get_bloginfo ( 'pingback_url' );  ?> <br />
<?php echo 'stylesheet_url: ' . get_bloginfo ( 'stylesheet_url' );  ?> <br />
<?php echo 'stylesheet_directory: ' . get_bloginfo ( 'stylesheet_directory' );  ?> <br />
<?php echo 'template_directory: ' . get_bloginfo ( 'template_directory' );  ?> <br />
<?php echo 'template_url: ' . get_bloginfo ( 'template_url' );  ?> <br />
<?php echo 'admin_email: ' . get_bloginfo ( 'admin_email' );  ?> <br />
<?php echo 'charset: ' . get_bloginfo ( 'charset' );  ?> <br />
<?php echo 'html_type: ' . get_bloginfo ( 'html_type'  );  ?> <br />
<?php echo 'version: ' . get_bloginfo ( 'version' );  ?> <br />
<?php echo 'name: ' . get_bloginfo ( 'name' );  ?> <br />
<p> 'url: ' <?php bloginfo ( 'url'  );  ?> </p>
<p> 'home: ' <?php bloginfo ( 'home'  );  ?> </p>
<p> 'siteurt: ' <?php bloginfo ( 'siteurl'  );  ?> </p>
<p>  'wpurl: ' <?php bloginfo ( 'wpurl'  );  ?> </p>
<p>  'description: ' <?php bloginfo ( 'description' );  ?> </p>
<p>  'rdf_url: ' <?php bloginfo ( 'rdf_url' );  ?> </p>
<p>  'rss_url: ' <?php bloginfo ( 'rss_url' );  ?> </p>
<p>  'rss2_url: ' <?php bloginfo ( 'rss2_url' );  ?> </p>
<p>  'atom_url: ' <?php bloginfo ( 'atom_url' );  ?> </p>
<p>  'comments_rss2_url: ' <?php bloginfo ( 'comments_rss2_url' );  ?> </p>
<p>  'pingback_url: ' <?php bloginfo ( 'pingback_url' );  ?> </p>
<p>  'stylesheet_url: ' <?php bloginfo ( 'stylesheet_url' );  ?> </p>
<p>  'stylesheet_directory: ' <?php bloginfo ( 'stylesheet_directory' );  ?> </p>
<p>  'template_directory: ' <?php bloginfo ( 'template_directory' );  ?> </p>
<p>  'template_url: ' <?php bloginfo ( 'template_url' );  ?> </p>
<p>  'admin_email: ' <?php bloginfo ( 'admin_email' );  ?> </p>
<p>  'charset: ' <?php bloginfo ( 'charset' );  ?> </p>
<p>  'html_type: ' <?php bloginfo ( 'html_type'  );  ?> </p>
<p>  'version: ' <?php bloginfo ( 'version' );  ?> </p>
<p>  'name: ' <?php bloginfo ( 'name' );  ?> </p>