Jump to content

Recommended Posts

Hi guys, i have built a sort of blog for my site and i am using the simple pagination script that can be found in the interesting articles on the homepage of this site.

 

Everything is working perfectly at the moment.

 

The way i have it set up is to show only one post per page and it is ordered by DESC. so it shows the last entry on the first page.

 

What i would like to do, is on the right hand side of the page, is show all the blog titles or at least the last 10 blog entries and have these titles link to the page that these entries are on. This of course varies at any one time as people make new entries.

I know it would be easier to have it pull the info from the databse in ascending order, and then all the links would remain the same, but anyone coming back to look would see the same old post on the first page and COULD think that nothing is new here.

 

Be great if someone could help out here.  ;)

Link to comment
https://forums.phpfreaks.com/topic/188785-simple-pagination/
Share on other sites

Since you have one article per page, just duplicate whatever you have done for the page numbers but use <a href="blahblah...">$title</a> instead of  <a href="blahblah...">$page_number + 1 </a> (or whatever it is...you get my meaning though?)  and use LIMIT 10 for the DB query.

 

Pretty much impossible to say more than that without seeing your code.

Link to comment
https://forums.phpfreaks.com/topic/188785-simple-pagination/#findComment-996709
Share on other sites

Yea i am finding that out LOL

 

I have built a seperate page that will take the topic titles and build each individual page out based on the titles.

Not as pretty as having it all combined into one page, but at least people can link to each blog post with the links remaining correct.

Link to comment
https://forums.phpfreaks.com/topic/188785-simple-pagination/#findComment-996772
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.