• Originally my home.php file was making 3 “boxes” that contained the same content in the main column. There was a div id “homeleft” and “homeright” that appeared above “homebottom”. They were redundant and ugly so i removed them. It is my intention that the homebottom section show my blog posts.

    My blog is located here: wellnessinthenow.com

    The code for home.php is here https://pastebin.com/BMJVhEYp

    One blog post exists which you can find by clicking any catagory under the navbar.

    I’m very new to WP and php and would really appreciate it if someone could help me get my blog posts displayed in the “homebottom” section in the main column.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You need to review The_Loop.

    Thread Starter vipx

    (@vipx)

    I read that before I posted. I understand the logic of the loop. I even tried copying and pasting the sample “loop code” from that document and it wouldn’t pull any articles from the database. I’m not sure if it’s the custom php scripts the theme employs or if it doesn’t have all the needed loop code. I learned to build sites using html years and years ago… I haven’t looked at source code since I was 17. This PHP stuff is greek to me.

    Am I missing elements of the loop? I didn’t think I had removed any of that code. It used to pull “uncatagorized” posts with that heading in “strong” text and the post with a read more link… I’m going to review the loop again but I’d love it if someone could shed some light on this in the mean time. Maybe I’ll have a eureka moment before then.

    EDIT: Also, is the loop broken on index.php and home.php? I suppose it must be if no posts are being populated.

    It took me 4 hours to decode footer.php and add a pravacy policy to it… I can only imagine how long this is going to take.

    SECOND EDIT: Looks like I’ve made a mess taking out the other two boxes in the main column of home.php. It doesn’t even look like my other pages now. I’ll have to figure out another way to remove these boxes and have my blog posts actually show up.

    If you have a copy of the old Classic theme to hand, the Loop in index,.php is pretty basic and might help to get you started. Unfortunately, the loop in TwentyTen (in loop.php) is pretty complex. ??

    Thread Starter vipx

    (@vipx)

    Thanks esmi. I’m reviewing the Loop articles in the Codex now. It has helped me quite a bit. I’m going to restore the previous version of home.php and index.php and try again from scratch. Hopefully I can get things looking and acting the way I want. If not I’ll make a more informed post some other time.

    I’m going to restore the previous version of home.php and index.php

    Ah! Now there’s something that could cause confusion! Why do you have a home.php file and an index.php file.? On some servers, home.php will be loaded in preference to index.php. On other servers, it may be the other way around.

    Thread Starter vipx

    (@vipx)

    Really? Hmm… that makes a lot of sense. I think this one might be using home.php. I was thinking that they seemed pretty redundant. I’ll explore that a bit.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘home.php main column not pulling blog posts:’ is closed to new replies.