Loading Posts into custom page
# May 5, 2009 at 4:18 pm
Yeah, sorry, i am using the newest version of wordpress. Basicaly i want to create the page that shows all the posts from one catagory, i am aware that you can type in ‘mysite.com/catagory/hobbies’, but as far as i am aware, that url uses the ‘archive.php’ file. Which is also used for the archives (obviosly), the problem with this is that i want the archives and this new page to be styled differantly. So i created a new page and gave it a template, and now im trying to work out how to loads the posts into the new page.
Wooo….. sorry and thanks!# May 5, 2009 at 4:25 pm
Just checking before I gave you my 2 cents worth. :D
It’s best to keep posts and pages separate. You are on the right lines creating a link to that specific category, if you want it to display differently from all the other categories then you can make a custom category template.
Hope that helps.# May 5, 2009 at 6:37 pm
Great, that realy helped. One other thing though.I’m pritty sure it was either a article of tutorial on this site, but it was about using a php code to chane the ‘body’ id on the page so that current tabscan be selected. This is the code i have.Code:$page = $_SERVER[‘REQUEST_URI’];
$page = str_replace(“/” , “”, $page);
$page = str_replace(“.php” , “”, $page);
$page = str_replace(“?s=” , “”, $page);
$page = $page ? $page : ‘default’
Can someone please explain it to me because i have know idea how to edit it to work with my pages, my url is mysite.com/categories/videos.
Chris# May 6, 2009 at 5:46 am
There’s a nice little tutorial on changing the body id here http://elliotjaystocks.com/blog/2008/wordpress-tutorialhow-to-apply-a-dynamic-body-class-or-id/
Not sure what you are asking with your second question. Where are you trying to show your results from a certain category?
You must be logged in to reply to this topic.