Problems displaying specific categories
-
This is probably just some little mistake, or something I’m missing, but the docs don’t seem to have any reference for what I’m trying to do.
I’ve got a site for a client, and he needs to use wordpress for updating posts on cars he’s sold, and cars he has for sale. So what I wanted to do was make a page that’s “For Sale” and a page that’s “Sold”. Then, each page would display only posts from a specific category (like ‘sold’ and ‘forsale’). Not sure why I can’t get it to show. Here’s the code within the “Sold” page.
Call at beginning:
<?php define('WP_USE_THEMES', false); get_header('/var/www/jettvettes.com/public/blog/wp-blog-header.php') query_posts('category_name=vettessold'); ?>
Code for the posts (including The Loop):
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="welcome" class="post"> <h2 class="title"><?php the_title(); ?></h2> <h3 class="date"><?php the_date(); ?> Posted by <?php the_author(); ?></h3> <div class="story"> <?php the_content(); ?> </div> </div> <?php endforeach; else: ?> <p><?php _e('Sorry, nothing to show you for now, Check back later!'); ?></p> <?php endif; ?>
any ideas? Like I said, I’m probably just missing something, or have something entered wrong. I’m not too familiar with WordPress.
- The topic ‘Problems displaying specific categories’ is closed to new replies.