I want to list all the external links of my posts in a single place/file. How can I achieve this?
-
Is it possible to achieve this via a plugin?
-
Is it possible to achieve this with a built-in wordpress api?
-
Is it possible to achieve this via some free 3rd party tool?
What approach should be followed for achieving this?
The above code had pagination concerns when I wanted to parse each and every page. So, building on the above, plus a kicker to search for links without ‘nofollow’ attributes, I came up with the following:
Create a page with the name links.
Pages >> Add New
into your wordpress panel. Just name itlinks
and publish. See below.Now go to your theme folder
wp-contentthemesYOUR_ACTIVE_THEME_FOLDER
and create a pagepage-links.php
.And paste this code in
page-links.php
Now you need to make a change in the code above.
In place of
$_site_url = 'google.com';
write your own domain. Make sure it’s without www and without http://Have a look at the page.
NOTE: All pages that are linked internally are avoided, only pages that are linked to external sites will be visible.
Customize code for the needful.