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.

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.

Start promoting your blog

Download dozens of Logos, banners, website templates and many other marketing tools to market your WordPress Blog. [Recommended]

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 functions.php file of your theme or in 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 be looking 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 to 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.

See also 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 is displayed, you must then click " 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.

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.

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]

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.

Read also : 8 premium WordPress plugins for blog referencing

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 WordPress theme active on your website. As a feature, it offers among other things: a sleek design and well commented code, its fully customizable appearance, compatibility with the majority of premium WordPress themes, support for several 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

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]

Recommended Resources

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


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.

Back To Top