Grow your CSS skills. Land your dream job.

Loading Posts into custom page

  • # May 5, 2009 at 1:02 pm

    Hi, i have created a page and i want to load all the post with in a specific catagory, anyone know how?
    Many Thanks
    Chris

    # May 5, 2009 at 2:34 pm

    :?: Can you be a bit more specific. Are you talking about WordPress?

    # 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.
    http://codex.wordpress.org/Category_Templates

    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.
    Many Thanks
    Chris

    # May 5, 2009 at 8:12 pm

    Also, is there a way to filter the results in ‘the loop’ so it only shows results from a certain category.

    Many THanks
    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?

    # May 6, 2009 at 12:52 pm

    Thanks, ill look into thatlink, as for the other question, dont worry, i have solved it with a if in category function.

    # May 12, 2009 at 3:36 pm

    im pretty sure simplepie plugin should do what you want, it lets you post everything from a specific category into a static page

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".