Assign a link of a post to that contains that post?

I’m trying to figure out how can I assign the link of each post to every item that contains it. I would like to click on so I can go to the post page that the was containing.

Here is the item I’m talking about (it’s in the content.php file):

* Template part for displaying posts
* @link
* @package meptheme

<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<header class=”entry-header”>
if ( is_singular() ) :
the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ );
else :
the_title( ‘<h2 class=”entry-title”><a href=”‘ . esc_url( get_permalink() ) . ‘” rel=”bookmark”>’, ‘</a></h2>’ );

if ( ‘post’ === get_post_type() ) : ?>
<div class=”entry-meta”>
<?php meptheme_posted_on(); ?>
</div><!– .entry-meta –>
endif; ?>
</header><!– .entry-header –>

<div class=”entry-content”>
the_content( sprintf(
/* translators: %s: Name of current post. Only visible to screen readers */
__( ‘Continue reading<span class=”screen-reader-text”> “%s”</span>’, ‘meptheme’ ),
‘span’ => array(
‘class’ => array(),
) );

wp_link_pages( array(
‘before’ => ‘<div class=”page-links”>’ . esc_html__( ‘Pages:’, ‘meptheme’ ),
‘after’ => ‘</div>’,
) );
</div><!– .entry-content –>

<footer class=”entry-footer”>
<?php meptheme_entry_footer(); ?>
</footer><!– .entry-footer –>
</article><!– #post-<?php the_ID(); ?> –>

Here is the example: I’m on this page
I would like to click on the first and get addressed to

The tag on line 17 contains the correct link: ‘, ‘

Read more here:: <a href= target="_blank" title="Assign a link of a post to

that contains that post?” rel=nofollow>Assign a link of a post to

that contains that post?

Leave a Reply

Your email address will not be published. Required fields are marked *