• Hello,
    I’m trying to code a page to display a author’s bio and picture, and then I just need to display certain categories, for example categories 50, 51, 52, 53 with their full post, post category, and date posted. I’ve not had much luck. So far I have this:

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    /*
    Template Name: Name of Author Page
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="content">
    
    	<div id="contentleft">
    
    	<h1>Author Name</h1>
    			{WILL DISPLAY PICTURE AND QUICK BIO HERE}<br /><br />
    
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    		<?php endwhile; else: ?>
    
    		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    
    	</div>
    
    	<?php include(TEMPLATEPATH."/l_sidebar.php");?>
    
    	<?php include(TEMPLATEPATH."/r_sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>

    TIA for any help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Instead of this:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>

    Try this:

    <?php query_posts('cat=2,6,17,38'); ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <?php endwhile; ?>

    Replacing the numbers with your category IDs

    Thread Starter justinlosh

    (@justinlosh)

    no content will show up on the page, and i’ve triple checked the code and category id’s… any ideas?

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    /*
    Template Name: Name of Author Page
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="content">
    
    	<div id="contentleft">
    
    	<h1>Author Name</h1>
    			{WILL DISPLAY PICTURE AND QUICK BIO HERE}<br /><br />
    
    		<?php query_posts('cat=41'); ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <?php endwhile; ?>
    	</div>
    
    	<?php include(TEMPLATEPATH."/l_sidebar.php");?>
    
    	<?php include(TEMPLATEPATH."/r_sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme Category Page’ is closed to new replies.