How Can You Make Post Title A Link Which Shows The Full Blog Post?

make post title a link

When you visit any website’s blog page and see many blog posts with an excerpt and read more button. You click on the title of the post and it takes you to the full blog post.

Have you ever thought why is it showing the full content when you click on the title? How to make post title a link so that when someone clicks on it then the full post can be seen?

While developing a WordPress theme, you should take care of this term. It’s because how would you make your readers reach to the whole content of the post if you don’t make post title a link?

You should know about WordPress post title link so that if your WordPress theme doesn’t show it or you break the code then it would be helpful for you.

Make Post title A Link Using The WordPress Permalink Function.

Have you ever thought which is the code responsible for showing the title of the post on your website? If you’re a web developer then you would be happy to know that you can use the WordPress title function to show the title of the blog post.

<?php the_title(); ?>

Just use the above code and your WordPress theme will pick up the post title you give while writing a blog post.

But here, we are here to make post title a link. Whether you embed the post title in the <h1> element or <h2> element or any other HTML element.

You can use the permalink function. Just use the code shown below.

<?php the_permalink(); ?>

But this won’t do the work. You haven’t accomplished your goal of WordPress post title link.

NOTE:- If you know about making links in HTML then you won’t face any problem. Just use both the codes shown above in an <a> tag.

In the theme code, you would find a code showing the title of your blog post in any HTML heading tag. You just have to use the link tag.

Let me show an example.

<h1><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h1>

This code would make post title a link and your readers would able to click on the post title on the blog page to reach out to the full blog post.

The HTML heading tag can vary. But the code from the link tag would be the same.

With the use of this simple code, you would be able to make post title a link.

Do You Still Have A Question “how to link your blog title to the post content”?

WordPress is an interesting platform with numerous of codes. You just have to pick the right code to get your work done. Theme development would require to make post title a link.

How would you take your readers to the full post from the blog page if the post title would be just the text? This problem has been solved in this tutorial.

You can use the permalink function with many other things while developing a WordPress theme. If you have any question, feel free to ask.

by Ravi Chahar

A blogger, web developer, and designer who intend to guide his readers about WordPress, Blogging, Web Development, Web Design and more. I have expertise in WordPress theme development and customization. I can set up and redesign the Thesis themes. I have been working in this field for years now.

4 comments

    1. Hey Umesh,

      Coding is fun only if you dwell to it.

      Making the post title is the only thing which should be done to reach to your blog post. What would you do if the title os the post is just the text showing on the blog page?

      No one would reach out to your blog posts. So, the theme developers make it as a link.
      Thanks for stopping by.
      Have a great day.
      ~Ravi

  1. Hi Ravi,

    This is such an important step to take and it’s so great you’ve show people how to handle it simply.

    Without linking your title to your entire post, you certainly risk losing a lot of readers, a lot of clicks, a lot of subscribers and buyers.

    That’s why… as you suggest… many themes handle this out of the box.

    But if you have a theme that does not, you must undertake the job… with your help 🙂

    -Donna
    Donna Merrill recently posted…35 Best Types Of Blog Posts To Get Free Traffic | Neil PatelMy Profile

    1. Hey Donna,

      As you have mentioned, your readers won’t able to read your full blog posts. There may be many people who directly open your blog page and then decide to read the posts.

      But the title is not that link then no one would able to open the full post. Though this is not a problem for most of the people, but if your theme gets broken then you can fix this issue.

      Thanks for your comment.
      Have a happy day.
      ~Ravi

Leave a Reply

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

CommentLuv badge