Can you clarify what you mean by the “escape attribute”?
I think the problem with the title not displaying is b/c i do not know how to employ this within the code… http://codex.ww.wp.xz.cn/Function_Reference/esc_attr. Or it may be another syntax problem. I don’t know how to incorporate proper html markup inside php code; if that is in fact the issue. It could be css… here’s the markup for the links on h tags.
h1,h2,h3,h4,h5,h6 {
font-family: Verdana, Trebuchet, sans-serif;
margin: 3px 0 0 0;
padding: 3px 0 0 0;
}
h1 {
font-size: 1.7em !important;
color: #1c94c4;
font-weight: bold;
}
h1 a, h1 a:link, h1 a:visited, h1 a:hover, h1 a:active {
text-decoration: none;
}
h2 {
font-size: 1.5em;
color: #dba303; /*yelloworange*/
font-weight: bold;
}
h2 a, h2 a:link, h2 a:visited, h2 a:hover, h2 a:active {
text-decoration: none;
}
h3 {
font-size: 1.5em;
color: #90be4d; /*green*/
font-weight: bold;
}
h3 a, h3 a:link, h3 a:visited, h3 a:hover, h2 a:active {
text-decoration: none;
}
h4 {
font-size: 1.5em;
color: #db7d03; /*orange*/
font-weight: bold;
}
h4 a, h4 a:link, h4 a:visited, h4 a:hover, h4 a:active {
text-decoration: none;
}
What exactly are you trying to insert into your Posts and/or Pages?
Lisa
(@berelsonhotmailcom)
Just a standard news listing page of category id 14. i didn’t use custom post types.
looks like you have fixed the issue – there seems just a space character missing;
please post the current code if you like to have it corrected;
also review http://codex.ww.wp.xz.cn/Function_Reference/the_title_attribute
Lisa
(@berelsonhotmailcom)
Not yet. It’s a styling issue; nothing to do with esc attr. I just replaced the link with a simple slug and it still doesn’t work. Additionally doesn’t work in body copy either when h tags are linked so it’s nothing to do with the php code etc.
p.s. I also took out the query_post filter and replaced with WP_query as query_post was not recommended by codex.
code using a link slug
<?php
// the query
$newsquery = new WP_Query( 'category_name=news' ); ?>
<?php if ( $newsquery->have_posts() ) : ?>
<?php while ( $newsquery->have_posts() ) : $newsquery->the_post(); ?>
<h2 class="news"><a href="#"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
I’ll close out ticket and futz with css more.