Need help with Link Change

I’m currently trying to modify a site where there is a link within the menu. I would like the entire menu to be clickable so that the visitor reaches the site that is currently only reachable by clicking the specific text underneath the link.

How would I edit this code so that more than just the “Read More” text is the link? I would like that the entire column of each of the 5 verticle bars is a link, not just the “Read More” text at the bottom of each of the 5 menu bars.

Here is the part of the php code that I’m currently looking at:

<div id="banners-wrap">
		<div class="wrapper">
			<div id="banners">
			<?php $loop = new WP_Query(array('post_type' => 'custom', 'posts_per_page' => 5)); ?>
				<?php if ($loop->have_posts()): ?>
					<ul>
					<?php $posts_counter = 0; ?>
			<?php while ($loop->have_posts()) : $loop->the_post(); $posts_counter++; ?>
						
						<li class="block block-<?php echo $posts_counter; ?>">
						<h2><?php the_title(); ?></h2>
							<?php the_excerpt(); ?>
						<a href="<?php the_permalink() ?>" class="link">Read More</a>
						</li>
					<?php endwhile; ?>
					</ul>
					
				<?php endif; ?>
			</div>
		</div>
		</div>

Any help is greatly appreciated. Thank you.

Here are more info to my problem. What I’m trying to do is change the excerpt text in WordPress from the “read more” which is a link to having the entire excerpt as a link so that I can remove the “read more”.

thank you.

Sponsor our Newsletter | Privacy Policy | Terms of Service