| Creating a list of latest posts
|
Silver007A

msg:4270386 | 2:08 am on Feb 22, 2011 (gmt 0) | 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 :-)
|
g1smd

msg:4270479 | 8:58 am on Feb 22, 2011 (gmt 0) | 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.
|
Silver007A

msg:4270513 | 11:21 am on Feb 22, 2011 (gmt 0) | 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
|
g1smd

msg:4270639 | 5:26 pm on Feb 22, 2011 (gmt 0) | 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.
|
|
|