| View previous topic :: View next topic |
| Author |
Message |
Itsuki
Joined: 09 Dec 2004 Posts: 22
|
Posted: Fri Dec 10, 2004 7:20 pm Post subject: previous page / next page? |
|
|
Hi! I tried inserting the <?php posts_nav_link(); ?> tag just after the {$content} but nothing shows up. Do you guys have an idea on how to enable paging in my blog? Thanks!
In addition, the WP Wiki says this tag should go after the loop but I couldn't find the loop in my main and post templates.
Is it possibly because the main page is in html and not in php? |
|
| Back to top |
|
diskawa
Joined: 13 Dec 2004 Posts: 22
|
Posted: Tue Dec 14, 2004 1:39 am Post subject: Re: previous page / next page? |
|
|
| Itsuki wrote: | Hi! I tried inserting the <?php posts_nav_link(); ?> tag just after the {$content} but nothing shows up. Do you guys have an idea on how to enable paging in my blog? Thanks!
In addition, the WP Wiki says this tag should go after the loop but I couldn't find the loop in my main and post templates.
Is it possibly because the main page is in html and not in php? |
try;
| Code: | | {posts_nav_link separator=',' previous='<<' next='>>'} |
The WP Wiki normaly shows the PHP scripts, and that is most of the time for those who use WP on their own hosts etc..
Im not 100% certain, but it seems that you should use; { & } for opening and closing, and not the standard php ones; <?php
Maybe someone else can clearify this who has more knowledge of WP and Blogsome.com |
|
| Back to top |
|
Itsuki
Joined: 09 Dec 2004 Posts: 22
|
Posted: Tue Dec 14, 2004 2:31 am Post subject: |
|
|
Thank you so much! That worked for me  |
|
| Back to top |
|
zheaton
Joined: 03 Dec 2004 Posts: 532 Location: United States
|
Posted: Tue Dec 14, 2004 5:29 am Post subject: Follow-up Question |
|
|
Well, this leads to a more general question: Is there any way to call PHP code from within Blogsome? I'm playing with building an header image rotator right now (randomly selecting a item from a hand-defined array of image urls - very simple and low-overhead), but if there's no way to call PHP code from within BlogSome, then I can pitch that code without further delay.
Is there any chance that we can get a definitive answer from the admins on this? The ability to embed raw PHP code would be extremely handy for advanced template building.
Regards,
zheaton _________________ I'm no longer a moderator - don't PM me with questions.
Search the forum, check the wiki, and ask smart questions |
|
| Back to top |
|
diskawa
Joined: 13 Dec 2004 Posts: 22
|
Posted: Tue Dec 14, 2004 5:40 am Post subject: Re: Follow-up Question |
|
|
| zheaton wrote: | Well, this leads to a more general question: Is there any way to call PHP code from within Blogsome? I'm playing with building an header image rotator right now (randomly selecting a item from a hand-defined array of image urls - very simple and low-overhead), but if there's no way to call PHP code from within BlogSome, then I can pitch that code without further delay.
Is there any chance that we can get a definitive answer from the admins on this? The ability to embed raw PHP code would be extremely handy for advanced template building.
Regards,
zheaton |
Yes, this would be interesting to know actually. Just find it interesting that the Index file is named index.html instead of .php?
Maybe they built it this way are open to suggestions for improvement...
Would be great though to be able to add includes for example...
*thread hijacking*  |
|
| Back to top |
|
john Guest
|
Posted: Tue Dec 14, 2004 10:15 am Post subject: |
|
|
At the moment we have no plans to support users writing their own php pages, mostly for security reasons i'm afraid. Your "html" pages are smarty templates which allow quite a lot of freedom and allow you to do an awful lot of things.
However.
If you have a good idea for something more advanced and can provide it as a plugin that other users might want to use, we would certainly look at including it in our default set of plugins.
John |
|
| Back to top |
|
zheaton
Joined: 03 Dec 2004 Posts: 532 Location: United States
|
Posted: Tue Dec 14, 2004 1:50 pm Post subject: |
|
|
That's sort of the response I was expecting - time for me to look over smarty formatting rules and the steps for creating plugins. Thanks for the quick response!
Regards,
zheaton _________________ I'm no longer a moderator - don't PM me with questions.
Search the forum, check the wiki, and ask smart questions |
|
| Back to top |
|
XiangWei Guest
|
Posted: Fri Jul 08, 2005 10:05 am Post subject: |
|
|
diskawa said:
| Quote: |
try;
Code:
{posts_nav_link separator=',' previous='<<' next='>>'} |
I've tried to post it under {$content} on my template (index.html), but didn't work for me.
Do we need to add something to display it?
I am so confused. Have also tried to search other posts, but doesn't find the answer.
Please help..
Thanks.. |
|
| Back to top |
|
DrunkenLagomorph
Joined: 01 Jul 2005 Posts: 11 Location: Denver, Colorado
|
Posted: Fri Jul 08, 2005 4:56 pm Post subject: |
|
|
Here's how I did it (thanks to whoever answered this question in a previous thread )
In the code of your main page, look for:
| Code: | <div id="content">
{$content}
</div>
|
Add this code:
| Code: |
{previous_posts_link label="Newer Posts"}
{next_posts_link label="Older Posts"} |
You can change the text in between the quotes to whatever you want.
Your code should look something like this when you're done:
| Quote: |
<div id="content">
{$content}
{previous_posts_link label="Newer Posts"}
{next_posts_link label="Older Posts"}
</div> |
|
|
| Back to top |
|
XiangWei Guest
|
Posted: Wed Jul 13, 2005 5:33 am Post subject: |
|
|
Thanks Drunken,
But it still doesn't work!
I don't know what is wrong...
I see you also don't put tags in your blog? Could you pls try to insert it? I wonder if it works for you but doesn't work for me.
Thanks. |
|
| Back to top |
|
zheaton
Joined: 03 Dec 2004 Posts: 532 Location: United States
|
Posted: Thu Jul 14, 2005 1:55 am Post subject: |
|
|
XiangWei, can you post the code that isn't working for you? _________________ I'm no longer a moderator - don't PM me with questions.
Search the forum, check the wiki, and ask smart questions |
|
| Back to top |
|
XiangWei Guest
|
Posted: Sat Jul 16, 2005 5:07 am Post subject: |
|
|
Zheaton,
I made my 'main page' template looked like this:
| Code: | <div id="content">
{$content}
{previous_posts_link label="Newer Posts"}
{next_posts_link label="Older Posts"}
</div>
|
but my blog didn't show any previous or next link. |
|
| Back to top |
|
ching Guest
|
Posted: Sun Jul 17, 2005 5:17 pm Post subject: |
|
|
XiangWei,
the next and previous code should look like this:
| Code: |
<div id="content">
{$content}[color=red]
{posts_nav_link separator=',' previous='<<' next='>>'}[/color]
</div>
|
cheers,
ching |
|
| Back to top |
|
Guest
|
Posted: Sun Jul 17, 2005 5:24 pm Post subject: |
|
|
| ching wrote: | XiangWei,
the next and previous code should look like this:
| Code: |
<div id="content">
{$content}[color=red]
{posts_nav_link separator=',' previous='<<' next='>>'}[/color]
</div>
|
cheers,
ching |
i am sorry, it should be
| Code: |
<div id="content">
{$content}
{posts_nav_link separator=',' previous='<<' next='>>'}
</div>
|
hope it works.
ching |
|
| Back to top |
|
|