Change Default Posts on Homepage

Discussion in 'WordPress' started by Khaos05, Dec 29, 2009.

  1. #1
    This may be a dumb question, but it's 1AM and i'm swamped. Is there a way to show only posts from a certain category on the homepage. I have a category for "featured" that scrolls in a slideshow, but I want to show posts from the "latest" category as the first five on the homepage. Otherwise, the 5 things scrolling through my slideshow are the same 5 things showing as the most recent posts...at least for now...
     
    Khaos05, Dec 29, 2009 IP
  2. jamshed_11946

    jamshed_11946 Peon

    Messages:
    617
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    me also want to know this
     
    jamshed_11946, Dec 30, 2009 IP
  3. addlinkurl

    addlinkurl Well-Known Member

    Messages:
    2,409
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #3
    yes you can do it.

    latest 5 posts from all categories:

    latest 5 posts from the category X (3 is the category ID.).

    and show latest 5 posts from all categories, except the category X (8 is the category ID of category X)

    and you need some css.
     
    addlinkurl, Dec 30, 2009 IP
  4. Khaos05

    Khaos05 Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Which php file do I place that in? Also will it follow the style of the template without extra css?
     
    Khaos05, Dec 30, 2009 IP
  5. iR0ck

    iR0ck Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks addlinkurl
     
    iR0ck, Dec 30, 2009 IP
  6. Khaos05

    Khaos05 Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If I have a template already, where do I put that code in? index.php?
     
    Khaos05, Jan 2, 2010 IP
  7. addlinkurl

    addlinkurl Well-Known Member

    Messages:
    2,409
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #7
    addlinkurl, Jan 2, 2010 IP
  8. Khaos05

    Khaos05 Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ok - if I post my index.php will you tell me where to put it inside index.php? It has a slideshow at the top where I want to use a featured category and a news category for the latest 3 posts.
     
    Khaos05, Jan 2, 2010 IP
  9. addlinkurl

    addlinkurl Well-Known Member

    Messages:
    2,409
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #9
    we have to see the index.php @Khaos05.
     
    addlinkurl, Jan 2, 2010 IP
  10. Khaos05

    Khaos05 Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    There is the index.php - I would really like to have the posts from the news category cycle through on the homepage and keep the other posts under their categories on pages OR just keep the homepage from displaying a certain category...preferably the second option.
     
    Khaos05, Jan 3, 2010 IP
  11. addlinkurl

    addlinkurl Well-Known Member

    Messages:
    2,409
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #11
    please try this one. change the red "1" with your news category id(enter the Categories part in wordpress admin panel. check the url of the news category.you will see the category ID at the end of the url). if you want to show more than 5 posts from the category, change the red "5". you can not use the navigation(pagenavi) with this code.

     
    addlinkurl, Jan 4, 2010 IP
  12. Khaos05

    Khaos05 Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    What code can I insert to change the archives sidebar to show posts from "news" categories instead?

    Currently it's
    All I know is to change 'Recent Posts' to 'Recent News', but I'm not sure about actual code to get posts from a certain category...
     
    Khaos05, Jan 4, 2010 IP
  13. Khaos05

    Khaos05 Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I've almost got the website where I want it - I just need to change the archives to show the 5 most recent posts in "news" category and set the homepage to show recents posts from all categories except "news" and "featured".
     
    Khaos05, Jan 4, 2010 IP