| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|Creating a list of latest posts|
| 2:08 am on Feb 22, 2011 (gmt 0)|
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.
| 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.
| 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?
| 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.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2014 all rights reserved