372 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 1 000 and 5 000 dollars
  • Sweden
mrjasmin says

Hi! I´m having a little problem with my wordpress theme. I want to use query_posts on my theme, but when I add query_posts before the loop, than the page gets all white and everuthing on the page disappears. I´m using this before my loop.

How do i solve this problem ?

Here is my code :

<?php query_posts(‘category_name=Portfolio’); ?>

<?php if(have_posts()) : ?>

&lt;?php while(have_posts()): the_post(); ?&gt;

<?php the_title(); ?>

Posted in <?php the_category(’, ‘); ?> <?php the_date(); ?> <?php the_excerpt(); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ’% Comments »’); ?> <?php endwhile; ?> <?php if(function_exists(‘wp_paginator’)) { wp_paginator(); } ?> <?php else: ?>

Could not find any blogpost

<? endelse <?php endif ; ?>
751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

try using the category id instead of the name like this

queryposts(‘cat=category number goes here’);

by
by
by
by
by
by