I am getting a difficult time turning a publish informed right into a link. Essentially I am attempting to make the displayed posts into links. The Loop instantly shuts my
<a> tags and will not allow me to turn this content of
the_post() into one large link.
Here's the issue code. This most likely something simple I am just looking over.
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <a href="#" <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h3><?php the_title(); ?></h3> </a> <?php endwhile; ?>
*Edited to get rid of extraneous link. Also, this isn't valid HTML, it is simply test code for any proof-of-concept piece.
Your HTML is invalid.
Even when you desired to create the entire factor a hyperlink, where's your opening
<a>? Additionally, you're closing one with every iteration.
Publish your full code.
Your markup is totally invalid. You can't come with an
<h3>, or other block-level element, in a
<a>, and furthermore you cannot come with an
<a> in a
<a>. This isn't a Wordpress problem, this is just nonsense HTML.