Grow your CSS skills. Land your dream job.

Homepage Help

  • # January 3, 2012 at 10:16 am

    Does anyone have a good suggestion on how to execute this? What I’m looking to do is have a homepage that is broken up into 3 columns. The first two columns I want to be editable through the CMS. The final right column I wanted to have recent posts coming in.

    I was thinking initially to maybe just do 3 separate post loops and query a specific post id for the left and middle columns and then just exclude that post category from the right.

    Am I overthinking it?

    # January 3, 2012 at 10:41 am

    Personally, I would do it like this:

    Column 1: import/include a page
    Column 2: import/include a page
    Column 3: the posts loop

    The contents for the first two columns would just be pages with an empty template (no header, footer, or any divs — just basic content). To include these pages on your homepage, you can use this code:

    $include = get_pages('include=14');
    $content = apply_filters('the_content',$include[0]->post_content);
    echo $content;

    Where the example “14″ would be the ID of your page. So all in all:


    < ?php
    $include = get_pages('include=14');
    $content = apply_filters('the_content',$include[0]->post_content);
    echo $content;
    ?>



    < ?php
    $include = get_pages('include=15');
    $content = apply_filters('the_content',$include[0]->post_content);
    echo $content;
    ?>



    [ THE WHOLE LOOP THING HERE ]

    Then again, I’m sure there’s better ways, it’s just what would work best for me.

    # January 3, 2012 at 11:34 am

    Plugin: Advanced Custom Fields.

    You can set up two WYSIWYG areas on your ‘Home Page’ then run a loop in the third column with query_posts.

    # January 3, 2012 at 5:37 pm

    Awesome thanks guys I’m going to look at both of them. Appreciate the feedback.

    # January 7, 2012 at 1:08 am

    Thanks again for the info. I ended up employing Senff’s solution and it was a very excellent way of integrating everything. I’m looking into the other plugin though… I want to explore more how I can use that in the future :)

    # January 8, 2012 at 3:35 am

    I would have done what yo originally said, except that the column on the rght could use a widget area with the “recent posts” widget.

    # January 30, 2012 at 1:52 am

    Senff, how would I do something similar to this. I want a grid of thumbnails on my homepage that each link to a separate page. These thumbnails would pull from the featured image of that page. The page title will also be displayed above each thumbnail.

    Similar to http://demo.graphpaperpress.com/mixfolio/ in a way but those thumbnails would be pulling from pages and not images.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".