Categories with Spaces
I’m using the following code in my Loop:
<?php $my_query = new WP_Query('category_name=Fantasy/Science Fiction&showposts=5');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
- " rel="bookmark" title="Read <?php the_title(); ?>'s Review!"><?php the_title(); ?>
<?php endwhile; ?>
The problem is that the categeory has a space in it, and the loop won’t display it correctly.
Anyone have a solution to this? It’s very much appreciated.
- The topic ‘Categories with Spaces’ is closed to new replies.