View previous topic :: View next topic |
Author |
Message |
bluepxl
Joined: 10 May 2003 Posts: 31
|
Posted: Wed Jun 18, 2003 5:36 am Post subject: create a previous / next entries link? |
|
|
i have my blog set up to show 10 posts at a time, however instead of making the viewer go view all of the ones for the last month, or whatever the archives are set up as, can't i just give them something that is like previous 10 entries, etc? |
|
Back to top |
|
 |
Candle
Joined: 23 Dec 2002 Posts: 547
|
Posted: Wed Jun 18, 2003 5:40 am Post subject: ....... |
|
|
You just need to read the readme.html that comes with b2 and all this is in it .
Code: | <?php next_post() ?> *
Displays a link to the next post(s). (Generally you might want to use that tag only in single-post templates)
Parameters:
* format string for the link (default is "%", where % is replaced with the title of the next post)
* text to display to announce the link (default is "next post: ")
* "yes" or "no": display the title of the post, or no (default is "yes")
* "yes" or "no": display a link to the next post only if the next post is in the same category (default is "no")
* number: which next post ? if you make it '2', the 2nd next post is linked instead of the 1st next one (default is "1", which means first next post)
<?php previous_post() ?> *
Displays a link to the previous post(s). (Generally you might want to use that tag only in single-post templates)
Parameters:
* format string for the link (default is "%", where % is replaced with the title of the previous post)
* text to display to announce the link (default is "previous post: ")
* "yes" or "no": display the title of the post, or no (default is "yes")
* "yes" or "no": display a link to the next post only if the previous post is in the same category (default is "no")
* number: which previous post ? if you make it '2', the 2nd previous post is linked instead of the 1st previous post (default is "1", which means first previous post)
<?php next_posts() ?> *
Display the URL portion of a link to the next set of posts.
Generally you would use this in a template to navigate to the next "set" of posts when the "Show Options" settings for the site is set to "posts paged". The displayed string can be used to construct a link. When the site options are not set to 'posts paged", the next and previous functions will display nothing.
Parameters:
* Max page number to use. Default "0"; no limit
<?php next_posts_link() ?> *
Displays a full link to the next "set" of posts only if show options set to "posts paged" and only if there is another page or partial page of data.
Parameters:
* A user supplied string. Default "Next Page >>"
<?php previous_posts() ?> *
Displays the URL portion of a link to the previous posts.
Generally you would use this in a template to navigate to the previous "set" of posts when the "Show Options" settings for the site is set to "posts paged". The displayed string can then be used to construct a link. When the site options are not set to 'posts paged", the next and previous functions will display nothing.
Parameters:
* No parameters.
<?php previous_posts_link() ?> *
Displays a full link to the previous "set" of posts only if show options set to "posts paged" and if there is a previous set, otherwise nothing is displayed.
Parameters:
* A user supplied string. Default "<< Previous Page"
<?php posts_nav_link() ?> *
The function displays a complete navigation set of links including a user definable "separator" with the ability to supply a the text string to be used for the "previous" and "next" links.
The default result will produce the following string:
<< Previous Page :: Next Page >>
Parameters:
* A user supplied "separator" string. Default " :: "
* A user supplied "previous" string. Default "<< Previous Page"
* A user supplied "next" string. Default "Next Page >>"
|
_________________ My Game Forum
 |
|
Back to top |
|
 |
bluepxl
Joined: 10 May 2003 Posts: 31
|
Posted: Wed Jun 18, 2003 5:42 am Post subject: |
|
|
sorry.. i've read it like 3 times and find something new every time i guess i just suck @ reading! |
|
Back to top |
|
 |
sputtnik3030
Joined: 27 Jul 2004 Posts: 5
|
Posted: Sat Aug 21, 2004 7:10 pm Post subject: Same question |
|
|
I had the same question. But When I put these lines into my b2.php file I'm not getting a link for them. I have it set to cut off after 10 entries and I have about 15 of so on there right now. Is there any certain place that I need to put them? Thanks.
Matt |
|
Back to top |
|
 |
sputtnik3030
Joined: 27 Jul 2004 Posts: 5
|
Posted: Sat Aug 21, 2004 7:11 pm Post subject: |
|
|
Fixed it already, I had it set to 10 posts, not 10 posts paged. I feel stupid now for fixing it so quickly after posting. |
|
Back to top |
|
 |
|