How to link featured images to WordPress posts?

Recently, one of our readers asked us if it was possible to automatically link featured images on blog posts on WordPress ...

Well, you should know that most WordPress themes link images featured in articles by default, but others cannot. When we talk about binding here, we are talking aboutminiatures).

In this tutorial, we will show you how to automatically link images to one to articles on WordPress.

But if you have never installed WordPress, discover How to Install a WordPress Blog in 7 Steps et How to search, install and activate a WordPress theme on your blog 

Then back to why we are here.

how to link featured images to WordPress posts

Why link images to one's articles?

Images are more appealing than text. By using images in the front page, you can engage users of your website.

Discover How to fix the image upload error on WordPress

Usually featured images are large and take up more space than text. They are more colorful, therefore more visible. It's also easier to click on them when you're on small devices such as smartphones and tablets.How to add link on a featured image on wordpress

However, if your thumbnails are not clickable, then it is more difficult for users to view your article.

Learn by consulting this link How to display images in a grid

Most WordPress themes link featured images to articles by default. Some themes can't use this approach, which makes it difficult to use featured images.

See also our tip on Why do you have to start optimizing your WordPress blog by images

That said, let's see how you can automatically link images to one to articles in WordPress.

How to automatically link images to WordPress articles

This method requires the addition of a code on WordPress. We showed you how to create a WordPress plugin. You can use it to add this code. You can also add this code in a functions.php file of your WordPress theme.

function bpc_autolink_featured_images ($ html, $ post_id, $ post_image_id) {$ html = ' '. $ html. ' '; return $ html; } add_filter ('post_thumbnail_html', 'bpc_autolink_featured_images', 10, 3);

This code simply adds a link to the generated code to show images to one or the thumbnails of your blog.

See also How you can rename images on a WordPress blog

This code will also add a link around selected images on single pages or articles. If you don't want to link featured images to a single article while viewing the article in question, you can add this code.

function bpc_autolink_featured_images ($ html, $ post_id, $ post_image_id) {If (! is_singular ()) {$ html = ' '. $ html. ' '; return $ html; } else {return $ html; }} add_filter ('post_thumbnail_html', 'bpc_autolink_featured_images', 10, 3);

Discover also some premium WordPress plugins  

You can use other WordPress plugins to give a modern appearance and to optimize the handling of your blog or website.

We offer you here some premium WordPress plugins that will help you do that.

1. Advanced Floating Sliding Panel

Advanced Floating Sliding Panel is a WordPress Plugin which allows you to display controllable windows in minutes. Advanced floating sliding panel

It offers you a range of functionality, including shortcodes, a "builder" theme and the possibility of using it with third-party advertising services. Among its features, you can count: an onglet with vertical scrolling, an onglet scrolling horizontally, pseveral tabs that can be displayed at the same time, a unlimited number of tabs and more.

Download | Demo | Web hosting 

2. WordPress Plugin Reviewer

The Reviewer is a WordPress Plugin which allows you to quickly and easily insert reviews and comparison charts into your posts, pages, and custom post types. If you need to create a great summary of a review or just want to create a powerful and simple user review collection system, this plugin is what you are looking for.reviewer wordpress plugin 1

The flexible structure of the latter allows you to collect any type of opinion or criticism. IAll you need to do is create a form template and insert it into your publications or pages. Users and visitors will be able to leave their opinions there.

It also offers different customizable themes so that you can adapt your reviews and comparison tables to the look and feel of your website.

Download | Demo | Web hosting

3. tactile

Tactile is a WordPress menu and header solution for smartphones, created using Google's Material Design design principles. Its header design is extremely clean.

tactile

It has subtle and thoughtful animations, and at the same time offers plenty of customization possibilities, which in turn make this WordPress Plugin suitable for any website.

You will be able to quickly change the colors of each element, add a background pattern, modify the animations, show or hide different elements and so on ...

Download | Demo | Web hosting

Other recommended resources

We also invite you to consult the resources below to go further in the grip and control of your website and blog.

Conclusion

Here ! That's it for this tutorial. I hope you'll manage to add a link to your blog posts from your pictures to the front page. Feel free to share the tip with your friends on your social networks.

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation.

But, in the meantime, tell us about your Comments and suggestions in the dedicated section.

...