A piece, for example, is Posted in <?php the_category(‘, ‘) ?> and I have a category with “‘” in the title – so this seems like an easy confirmation — but it doesn’t work for me. I changed it to: Posted in <?php js_escape(the_category(‘, ‘)) ?>
So, not wanting to get a PHD in wordpress-ology, I thought I’d see if someone can tell me what I’m doing wrong (or better, how to fix this and strip the crlf’s in the_excerpt, too).
Here is an example of what I need in one line for the scroller: pausecontent2=’News.com: Technology and business reports‘
Here is the code which does a fine job displaying what I want, but not as one line with escaped “‘”.
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<?php the_excerpt(); ?>
<p class=”postmetadata”>Posted in <?php the_category(‘, ‘) ?> by <?php the_author() ?> : <?php the_time(‘F j, Y – g:ia’) ?></p>
<?php endwhile; ?>
<?php else : ?>
<p>Sorry, but you are looking for something that isn’t here.</p>
<?php endif; ?>
Thanks a bunch!! — Joe B.
- The topic ‘js_escape – why nothing?’ is closed to new replies.