There is no excerpt attribute. I think you have it confused with the title attribute.
<h2>
<a style="font-size:12px" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h2>
Thread Starter
lyvyoo
(@lyvyoo)
Thank you,
Your code isn’t ok for me beacause make to disappear my post excerpt, when you are with the mouse over the photos – http://www.liviufratila.ro/
simply remove it;
example:
<h2><a style="font-size:12px" href="<?php the_permalink(); ?>"><?php the_excerpt(); ?></a></h2>
Thread Starter
lyvyoo
(@lyvyoo)
alchymyth Thank you! It worked!
Thread Starter
lyvyoo
(@lyvyoo)
Now, in this new line that solve the topic problem, I have a secondary and last error:
“document type does not allow element “p” here; missing one of “button”, “map”, “object”, “ins”, “del”, “noscript” start-tag” (W3C Validator)
But I don’t see “p” in php code…
<h2><a style="font-size:12px" href="<?php the_permalink(); ?>"><?php the_excerpt(); ?></a></h2>
the_excerpt()
automatically wraps the text into a <p>
tag;
try and use this instead:
<h2><a style="font-size:12px" href="<?php the_permalink(); ?>"><?php echo get_the_excerpt(); ?></a></h2>
http://codex.wordpress.org/Function_Reference/get_the_excerpt
Thread Starter
lyvyoo
(@lyvyoo)
Thank you again! You help me a lot to validate the html.