WordPress.org

Ready to get started?Download WordPress

Forums

call posts with specific categories? (5 posts)

  1. kevinalves
    Member
    Posted 1 year ago #

    Hi, I am brand new to wordpress, but have at least a working knowledge of PHP.

    I have a static front page, and I want 4 links on that page (spring, summer, winter, fall).
    is there a way for those four links to navigate to the main blog but only display the posts that were given any one of those categories?

    in other words, the user clicks spring, sees a blog with posts pertaining to spring and etc...

    there must be a way to do this, but I just dont really know where to start.

    thanks!

  2. Neal Bloome
    Member
    Posted 1 year ago #

    If you have a working knowledge of PHP try looking here - http://codex.wordpress.org/Function_Reference/query_posts#All_Posts_in_a_Category

    That will enable you to display posts of a specific category, or you could just use the default permalink structure and add your links manually.

    By default permalink structure I mean you can usually do something like example.com/category/spring/ or example.com/category/summer/ and it will display only the posts in those categories.

    Let me know if that pointed you in the right direction, if not I can go into more detail about how to do it.

  3. kevinalves
    Member
    Posted 1 year ago #

    Default permalink structure is exactly what I was hoping I would find.

    I guess my next question though, is how do I do a structure like that. (I know thats a poor sentence, but im struggling to articulate). I mean, I just looked up how to change my default permalink structure, but I guess I dont know what to change it too. also it starts with localhost because its just the development site, its not live yet. does that matter?

    thanks for your help, I hope you can understand what I'm trying to say.

  4. Neal Bloome
    Member
    Posted 1 year ago #

    Basically I find the best permalink structure to be /%postname%/ you can change it from logging into your WordPress admin panel and going to Settings -> Permalinks and clicking Post Name.

    In the Category base you can change it from being /category/your_category_name/ to /whatever/your_category_name/ same goes with tags on your site, the default is /tags/ but you can change it to /topics/ if you want.

    As for it being on your localhost for now, no it doesn't matter when you migrate to your production environment all you'll have to do is make sure you go into Settings -> Permalinks and have them the same as your development environment.

    Hope it helps a bit more, you can also reference - http://codex.wordpress.org/Using_Permalinks for additional information on permalinks in WordPress.

  5. kevinalves
    Member
    Posted 1 year ago #

    Adam thank you so much. Not only did I figure this thing out, but I learned a lot while doing so. I just needed a simple change to the permalink structure. Thank you for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.