Forums

1 post, 3 asides on front page (Hemingway) (6 posts)

  1. electriccounterpoint
    Member
    Posted 1 year ago #

    So my testbed blog is here: http://danray.org/wordpress/. What I'd like on my front page is one full-length post and three asides below it, like this:

    one full-length post
    --------------------
    Aside |Aside | Aside
      1   |  2   |   3

    I'm trying to follow the instructions for adding asides given in the codex, but because I've already applied another hack to my index.php, it's starting to get a little complicated.

    The relevant section of my index.php file is here: http://danray.org/index.php.txt

    I think all I need to do is set up a PHP if-then statement that says, "when generating the 'top' CSS class (the full-length post), find the first post whose category != 20 and stick it in. Then, move on to the 'first' class (the short asides) and display the first three posts whose category == 20." But I don't know how to construct that or exactly where to put it.

    Any ideas? Thanks in advance!

  2. electriccounterpoint
    Member
    Posted 1 year ago #

    bump -- can anyone give me an idea of where to start?

  3. moshu
    Member
    Posted 1 year ago #

  4. electriccounterpoint
    Member
    Posted 1 year ago #

    Right, that's the page I linked above. My problem is, my index.php (also linked in the first post) doesn't look like the default one that they're using as an example, so I'm struggling to place the code where it belongs.

    I wish the codex's code snippets were commented in such a way that I could figure out what each line was meant to do. I'm starting to learn PHP, but as it is now, I'm stuck.

  5. moshu
    Member
    Posted 1 year ago #

    I think the problem is NOT with the Codex but with your theme that has a different Loop than most, more usual, themes.

  6. electriccounterpoint
    Member
    Posted 1 year ago #

    I'm not saying that the codex is faulty (in fact, if I get this working, I'll gladly update it with instructions for the Hemingway family of themes). I'm just trying to figure out what does what in my theme and in this code.

    I guess for now I'll go back and look at the codex's page on the Loop.

Topic Closed

This topic has been closed to new replies.

About this Topic