Skip to Main Content

How to make an external connection with the article title WordPress

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 600.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

Would you like to add a link to an external source on the title of your WordPress article?

Sometimes you may want to share a link with your users. Instead of sending them to the article, you will want the title of the article to be a connection to the source you want to share.

In this tutorial, we will show you how to make links to other sources from the title of your WordPress articles.

But before, 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.

1 Method: How to link to an external source on the title of your articles with a plugin

This method is easier and is recommended for beginners.

The first thing you need to do is to install and activate the plugin Page Link To. For more details, see our step-by-step guide on how to install a WordPress plugin.

After activating the plugin, all you need to do is create an article or edit an existing one. You will notice a new "Page To Link" meta box in the text editor.

Page link to WordPress plugin

Click on " A Custom URL To add the link you want to add to the article title. Now you can save or publish your article.

Discover our 5 WordPress plugins to save your blog

That's all. The title of the article will now be a link to the custom URL you provided.

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

This method does not only apply to external links. You can also use it to send users to different articles and pages of your WordPress blog.

2 Method: How to Bind to Another Source Manually

This method requires you to add code on WordPress. You can use this method if you know how create a WordPress plugin for example.

So just add this code to your theme 's functions.php file or your WordPress plugin.

Function print_post_title () {global $ post; $ ThePostID = $ post-> ID; $ Post_id = get_post ($ thePostID); $ Title = $ post_id-> post_title; $ Perm = get_permalink ($ post_id); $ Post_keys = array (); $ Post_val = array (); $ Post_keys = get_post_custom_keys ($ thePostID); ($ Pkey); $ ($ pkey); $ ($ pkey); $ ($ pkey); $ {$ post_keys }} If (empty ($ post_val)) {$ link = $ perm; } Else {$ link = $ post_val [0]; }} Else {$ link = $ perm; } Echo '<h2> <a href="'.$link.'" rel="bookmark" title="'.$title.'">'. $ Title. '</a> </ h2>'; }

This code appears to search for a custom field containing your custom URL. If the article has the custom field, it uses the title of the article linked to your URL.

Discover How to add a custom login URL on WordPress

The next step is to replace the default display of the title on your theme. You will find it in the following files archives.php, content.php, category.php and other models. You will find something similar to this:

<? Php the_title (sprintf ('<h2 class = "entry-title"> <a href="%s" rel="bookmark">', esc_url (get_permalink ())), '</a> </ h2 > '); ?>

You must replace it with this code:

<? Php print_post_title ()?>

The code part is complete, now you have to add the external URL to the article. Just edit an article or create a new one. On the text editor page, navigate to custom fields.

Discover too How to put your WordPress website in Maintenance mode

If you can not see the Custom Fields section, then you have to click on the Screen Options and you must check " Custom fields".

custom fields WordPress screen options

When the Custom Fields box will be displayed, you must then click on " Enter a new one".

create a new custom field

Come in " external_url As the field value, then set the URL to which you want to link. And that's all.

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

Discover also some premium WordPress plugins

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

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

1. WooCommerce Progressive Web App Starter Kit

PWACommerce is a WordPress plugin that helps you turn your WooCommerce online store into a Mobile Web application. It is compatible with smartphones and tablets iOS et Android, as well as browsers Safari, Google Chrome, Android.

The WordPress plugin has been tested on WordPress 4.8 and more, and its features are among others applications that load almost instantly, regardless of the type of network connection used by your user, its banners allow users to add quickly and easily. seamlessly your mobile application on their home screen, which will facilitate the launch of your mobile application as well as feedback from your users.

Animation support, scrolling and smooth navigation just confirm the silky experience this plugin offers.

Download | Demo | Web Hosting

2. Flex-Register

Flex-Register is a WordPress plugin that allows you to add a registration form or login in a lightbox. A refresh of the page will not be necessary and it will work immediately after its installation. No configuration will be necessary.

It will also take care of matching your form with the style of the active WordPress theme on your website. As functionality, it offers among other things: a clean design and a well-commented code, its fully customizable appearance, compatibility with the majority of popular WordPress themes, support for multiple browsers and others.

Download | Demo | Web Hosting

3. WP Ultimate Social

This is an ultimate pack of all the social networking features you may need on your WordPress blog.wp-ultimate-social

Its main features are: several social network icons, social sharing that allows anyone to share the content of your website (articles, pages, images, media) on popular social networks (Facebook, Twitter, Linkedin, GooglePlus, Pinterest, Digg, Buffer, Reddit, Tumblr, Stumbleupon, Xing, Weibo, VK, Delicious), connection to the website with your social network IDs, a counter to view the numbers of your followers, and shares of your website and others.

Download | Demo |Web Hosting

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [FREE]

Recommended Resources

Discover other recommended resources that will accompany you in creating and managing your website.

Conclusion

Here ! That's all. We hope this tutorial will help you to link to other sources on your WordPress blog. feel free to share this tutorial with your friends on your favorite 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.

If you have suggestions or remarks, leave them in our section comments and.

...

This article features 1 comment
  1. [...] In this tutorial, I will show you how to make external links with the title of your articles on WordPress. [...]

Leave a comment

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

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Cool WordPress Themes that I found on
And there are more 50 000 themes and models to choose from!

Back To Top
24 shares
Share22
tweet2
Save
WhatsApp