Multi-word tags?
-
Can I use multi-word tags? I am trying to create a small gallery of thumbnails from the posts I have made. The posts on which the pictures reside are tagged with the artist’s name. I have this code to call the nested loop:
`<?php $parent_title = get_the_title($post->post_parent); ?>
<?php if ( $parent_title == “About” ) { ?>
<!– query –>
<?php $my_query = new WP_Query(‘tag=arpit dave’); ?>
<?php //echo $my_query; ?>
<!– loop through query –>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<!– do this –>
<ul class=”thumbnails”>
<li id=”post-<?php the_ID(); ?>”>
” title=”Link to <?php the_title_attribute(); ?>”><?php the_thumbnail(); ?><!– end loop –>
<?php endwhile; ?>
<?php } ?>’For some reason, it will work if the category_name in the query is “arpit dave” but not if the tag is. Do tags HAVE to be one word? How do tag-based archives deal with that?
- The topic ‘Multi-word tags?’ is closed to new replies.