| Anime Oasis Reborn | |||||||||||||||||||||||
![]() | |||||||||||||||||||||||
Sitely
Resources
Layout Templates
Tutorials
Graphics
Premade Layouts
Neopets Graphics
Manga Reviews
Network
Siblings
Affiliates
Link Exchange
Credits/Disclaimer
|
Managing amount of posts shown on a page. // Contact me // Back
Are you having all of your posts show up on one page and wanting it to be more like 1 or 3posts per page? Its very simple really and easy to do, first lets look at the code I have used:
<?PHP $Template = "Beauty"; // This is the name of the template, they template in this code I am using is being told to use the template which I have named beauty. $number = "1"; // This tells it how many posts per page to show, if I wanted it to show 5 posts this would be 5. $category = "1"; // Remember how we needed to know the ID number of our category? Well this is where we put it. I had mine as category ID 1 (one) so therefore its a 1, if it was category 2 I would make this a 2. include("cutenews/show_news.php"); // This is the place its extracting the news from. Cute news I have in my main directory (folder). If I was using a file which was in a folder other then the main directory (folder) and I had to go up a file I would add ../ every time i had a folder to move up. Confused? here is an example: Say I have a folder called...new and a folder in that I had category, and my page was in the category folder. main directory - > new - > category the include would look like this: include("../../cutenews/show_news.php"); So all you have to do is change $number="1"; to whatever it is you need it to be and how many posts you want on each page. After it has that amount of posts the older posts are automaticly moved to a new page and newer ones are posted on the current page at the top (unless you have settings in your cutenews saying otherwise).Test the page to make sure it works, any questions feel free to Contact me // Back |
||||||||||||||||||||||