How to pull latest WordPress post title to index page.

Discussion in 'PHP' started by AgentD, Mar 12, 2007.

  1. #1
    I have a site with a php index page, and in the directory /blog/ is a WordPress blog.

    Is it possible to pull the title (automatically, and linked) from the most recent post in /blog/ to /index.php?

    Any help is appreciated.

    D
     
    AgentD, Mar 12, 2007 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes.

    You need to do an sql query from your wordpress database.

    Something like
    select * from wordpress_database orderby post_date LIMIT 1

    Not sure what your table columns are called though......
     
    mad4, Mar 12, 2007 IP
  3. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #3
    just-4-teens, Mar 12, 2007 IP
  4. AgentD

    AgentD Peon

    Messages:
    131
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the replies. I will have to look more into it, I'm not a php guru. So whatever specifics you can muster up is helpful.

    Mucho gracias.
     
    AgentD, Mar 12, 2007 IP
  5. AgentD

    AgentD Peon

    Messages:
    131
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Is this done from the database, or just something put into index.php?
     
    AgentD, Mar 12, 2007 IP
  6. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #6
    that would be done via a database.
     
    just-4-teens, Mar 12, 2007 IP