SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script to get last blog post

    I have a word press blog and I would like to put on my site a small box that shows the last post on my blog. Not a link to it, but the actual content/entry itself.

    Has this been already done? If you know a script please post the link for me. Thanks.

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2007
    Location
    Cyberspace
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could display the RSS feed, I suppose.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know, I need display only the latest post, any ideas?

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do you want to use JavaScript to do this?

    Why can't you use PHP and MySQL to grab the latest post from the database that WordPress is using?
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    Why do you want to use JavaScript to do this?

    Why can't you use PHP and MySQL to grab the latest post from the database that WordPress is using?
    I could use php but I'm using the hosted version of Wordpress so I don't have access to the database.

  6. #6
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have access to PHP on your server, you could use PHP and CURL to get the RSS feed and then display the portion(s) you want on your page. It's not exactly simple, but that's how I'd go about it. (You may want to ask an advisor to this thread to the PHP forum for you.)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •