Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14217 reviews 1686 hosting providers

Questions & Answers

Adding an automatic link to a Post

May 5, 2012 by Susan3
hello there
I want to add an automated master link to a republished post. I want this link to be inserted automatically when I publish an article. I have a few wordpress sites and when I post a new article at my master site, it is automatically copied as well to my other site. On my other sites I would like to have a link at the bottom of the article that is automatically created and inserted and that, when clicked on, opens the original article at the master site.
Can anyone help me do this?
Thanks

1 Answer

0 votes
May 5, 2012 by moon_tag
Try this code

<?php
$string = get_permalink();
$string = "$string";
$malestr = str_replace("textsite", "www", $string);
?>
Image Article: "><b><?php the_title(); ?></b>