Hi I have a button for each of the events I want and I want the user when they click it to be taken to the post, but when clicked they do not get taken to the post, rather they get taken to the front page which is not I want. The button was created in CSS, not WordPress here is my code.
"<div class="col-md-4">
<?php $post_id = 5451;
$queried_post = get_post($post_id);?>
<h3><?php echo $queried_post->post_title; ?></h3>
<p><?php echo get_the_date( 'j F, Y' ); ?></p>
<?php echo $queried_post->post_excerpt; ?>
<?php echo get_the_post_thumbnail($queried_post, 'full', array('class' => 'img-responsive')); ?>
<?php echo '<a class="btn2 readmore" href="'.get_permalink($queried_post).'">Find Out More</a>';?> "
(this code above is in my index.php)
"<div class="col-md-4">
<h3>Spacey Jane: MUSIC</h3>
<p id="spaceyjane">Following huge demand for their first show, Spacey Jane announced a second date on their forthcoming national Sunlight tour. They're joined by special guests Jack Davies and the Bush Chooks.</p>
<p id="date1">Sat 10 Apr 2021 | 6:00pm — 10:00pm | South Lawn</p>
<img src="images/event1.png" alt="spaceyjane">
<button type="button" class="btn2">Find Out More</button>
</div>` <div class="col-md-4">
<h3>Spacey Jane: MUSIC</h3>
<p id="spaceyjane">Following huge demand for their first show, Spacey Jane announced a second date on their forthcoming national Sunlight tour. They're joined by special guests Jack Davies and the Bush Chooks.</p>
<p id="date1">Sat 10 Apr 2021 | 6:00pm — 10:00pm | South Lawn</p>
<img src="images/event1.png" alt="spaceyjane">
<button type="button" class="btn2">Find Out More</button>
</div>"
(this code above is in my index.html)[front page events section][1]
[1]: https://i.stack.imgur.com/Q6wOu.png
What I have tried:
I have tried moving the post id and get post above col-md-4, that did not do anything.