Welcome to WebmasterWorld Guest from 54.162.12.134

Forum Moderators: incrediBILL

Message Too Old, No Replies

Creating a list of latest posts

     
2:08 am on Feb 22, 2011 (gmt 0)

5+ Year Member



Hi,

If I have a blog and want the titles of my latest 5 posts to appear automatically in a list on my home page, is there a way to do it with basic html/css? or does it need a script?

I'm looking for a way to have the latest 5 posts to appear without having to create the link and input the name every time.

Thanks

:-)
8:58 am on Feb 22, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Yes, a few lines of PHP and mySQL code can pull the titles of the latest 5 entries from the database and show them in a box.

If it is popular blog software, it is likely someone has already written just such an extension.
11:21 am on Feb 22, 2011 (gmt 0)

5+ Year Member



Thanks for the reply.

It is just a plain html css site. I normally use Joomla, but not this time :-) Any ideas on a bit of script linked with a txt file maybe?

Thanks
5:26 pm on Feb 22, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Are you saying the blog uses flat files, and not a database?

If so, then you could:
- set the server configuration so that .html files are parsed for PHP content,
- use a PHP include to "include" a file which will contain the list of links.

In future you'll only need to alter that file once to change all links on the site.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month