how to modify pages appearence on search results?
-
hi everybody.
my search results look like this:<?php if (have_posts()) : ?> <h1>Search Results</h1> <ul class="dates"> <?php while (have_posts()) : the_post(); ?> <li> <span class="date"><?php the_time('n.j.y') ?></span> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> Published on <?php the_category(', ') ?> </li> <?php $results++; ?> <?php endwhile; ?> </ul>
the only problem i have with it is that pages don’t have categories, and so they show in the list in a broken sentence, like this:
“ABOUT ME published on”what can i do to so that the “published on” will not show after names of pages in the list?
thanks a lot!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how to modify pages appearence on search results?’ is closed to new replies.