homepage Welcome to WebmasterWorld Guest from 23.22.194.120
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved