Create a transition page for WordPress when you click on the external link
Note: Do not use the Plugin
Browse through a few posts on the network to see how not to use the Plugin pretty. However, there is a downside that applies only to the links outside the content of the article only.
How to implement quite simple?
You just copy the following code and paste into functions.php file in the theme is used to be.
function wp24h_filter_content($content) {
$new_content = str_replace('href="', 'href="https://bestshares.net/go.php?u=', $content);
return $new_content;
}
add_filter('the_content', 'wp24h_filter_content');
* After inserting, you create the file go.php peer to your wp-admin directory. Finally, copy the following code and paste it into the body of the new go.php file.
<html>
<head></head>
<body>
<center>
<?php $gourl=$_GET[ 'u']; ?>
<iframe name="cwindow" style="border: 0pt none;" src="<?php echo $gourl; ?>" rel="nofollow" height="100%" scrolling="AUTO" width="100%"></iframe>
</center>
</body>
</html>
Leave a Reply