• Resolved ndjworldnews

    (@ndjworldnews)


    Hello;

    Does anyone know how to auto add a ‘master article link’ to a republished post?

    I have two sites. When I post a new article at my master site, it is automatically copied as well to my second site.

    At my second site 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.

    I hope I explained this right….

    Does anyone know how to do this?

    Thanks

    Lode

Viewing 3 replies - 1 through 3 (of 3 total)
  • I dont’t think there is any automatic way of doing this but you can insert a link manually like this:

    <a href="https://forums.wordpress.com" title="wordpress.com forums" target="_blank">Wordpress.com</a>

    The general format is like this:

    <a href="your URL goes here" title="your links title text here" target="_blank">The text that is visible on your site/blog</a>

    Hope this helps.

    Thread Starter ndjworldnews

    (@ndjworldnews)

    Hey thanks;

    I was afraid of that. Unfortunately manually won’t work:

    1. I write between 10 to 20 posts per day every day at my master site
    2. the Permalink() at my master site is different and that means I would need to keep track of every post ID() for every post I write in order to have the correct link at the secondary site.

    A bit too much work.

    Thanks though, I do appreciate you help.

    I am just wondering how RSS sites are able to keep links intact, maybe I could use a similar approach?

    Thanks again

    Lode

    Thread Starter ndjworldnews

    (@ndjworldnews)

    hello;

    Thanks again for the help. I figured it out.

    Here’s the code I created and works like a charm:

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

    Just beautiful.

    Thanks again

    Lode

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How To Add A Master Link To A Post?’ is closed to new replies.