WordPress.org

Ready to get started?Download WordPress

Forums

Link to latest post from external site (4 posts)

  1. treehugga
    Member
    Posted 7 years ago #

    Hi folks

    I want to post a link on an external website that shows my most recent blog post title automatically, something like:

    Latest Blog News: latest post title goes here

    I am using permalinks custom as /%category%/%postname%/ if that helps.

    So I need the relevant path to use ie. <a href="www.myblog.com/latest-post-link">

    Hope that makes sense!

  2. pizdin_dim
    Member
    Posted 7 years ago #

    If I understand you correctly: you want to create a link on site (a) which point to the latest post on site(b), is that correct?

    If so, it can't be done in a conventional way. However, if you write some PHP code on site (a) which grabs the RSS feed from side (b), then that code could simply parse the XML, and output the title and link of the first item. If you have PHP V5, you should be able to do it using the SimpleXML library.

  3. treehugga
    Member
    Posted 7 years ago #

    oh dear! Thanks pizdin but I don't know any PHP so I guess I'll have to forget this one. Shame.

  4. pizdin_dim
    Member
    Posted 7 years ago #

    Contact these people, I believe they have done some work in this area just recently.

Topic Closed

This topic has been closed to new replies.

About this Topic