The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] Pages or Categories?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #28163


    ok there is one thing that really bakes my brain at the moment and i am hoping that you guys can help me with it…

    chris uses pages rather than categories for each section. i.e screencasts page – not a screencast category, and a freebies page rather than a freebies category. cool. i love that idea… one great thing is you don’t get a horrible looking url like css-tricks/category/screencasts. instead you get css-tricks/screencasts.

    however, what i don’t understand is how you can have posts that live in those pages. these pages act like archives. i was under the impression that when you make a post you choose where it is displayed. so it will normally show on the index page unless you specifically choose for all your posts to show on a different page.

    (please stay with me on this one! :) )

    i can’t seem to get my head around the way that chris makes a new post and it will go in to screencasts page for example as well as showing on the index page.

    your initial reaction to my problem would be to say that you do this by assigning each new post a category when you write it. so when he writes a new screencast post, he ticks the screencasts category and then it will show on the index page and also live in the screencasts category with all the other screencasts. BUT HE’S NOT USING CATEGORIES. HE’S USING PAGES!!!

    so please can someone explain to me and put me out of my misery? i understand that it’s a long winded question but it’s a pretty complex issue in my mind.

    does anyone know how to solve this mystery? you would be my hero if you can!




    In its most simplest form:

    1. He creates a template called "freebies.php"

    2. In that template he has a loop running to only show posts that have a category of "freebies"

    3. In the WP backend he creates a new page called "Freebies" and in the right sidebar selects the Freebies template that he created in step #1

    Now when you click on the Freebies page it will list all posts that have a category of "freebies", but it is not a category page (ie, not using category.php or archive.php).

    Does that make sense?


    Dude! you are such a dude!

    you couldn’t have explained that any better. i completely understand and i am so greatful that you read my post and understood it AND could answer it so eloquently.

    wow, how can i repay you for that? it’s been melting my brain for a while now and you have saved me.

    honestly thank you so much doc. that was absolutely awesome of you. i hope you have a great day and great weekend.

    — edit —
    i just need to work out how to make that loop for each page to pull in posts from the specific category. i’ll have a look around and if i find it i can post it back on here in case anyone else would benefit from it




    It’s just a normal loop with a query in front of it.

    From the snippets section:


    Just need to find out what the category id# is!



    i am so grateful doc. really, it’s just amazing how great a resource css-tricks is and you have been so helpful. i think i’ll try and answer other people’s problems on here and give something back to this place now. i want to be able to sort people out like you have done.

    thanks again man, i am literally beaming because you have made me so happy!! :D

    you are definitely a hero!


    No worries, we all had to start somewhere.

    I remember I had a real hard time wrapping my head around coding for WordPress because I was always making it more complicated in my head than it had to be.

    I first really "got it" when I first coded all templates into HTML, made sure things were working 100% and THEN started replacing items with WP tags.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Back End’ is closed to new topics and replies.