• This is my solution for replicating something like this https://s3.envato.com/files/151749/screenshots/2_Homepage.jpg

    the “about us”, “what we do”, and “our mission” columns.

    <?php
    query_posts('page_id=2');
    query_posts('page_id=3');
    query_posts('page_id=4');
    ?>

    those are the codes to retrieve content from separate pages for each column.. and I’ll have to display them as excerpts and give them a
    <li> to align them like in the image.

    But the theme from the image has theme settings in which you write what you want for each column on the homepage instead of retrieving pages.

    How would one be able to get those functions? Is it something very difficult?

Viewing 2 replies - 1 through 2 (of 2 total)
  • you could make a page template and assign it to a page with the title ‘home’, for instance.

    the template code could be something like:

    <?php
    /*
    Template Name: three intro blocks
    */
    get_header(); ?>
    <div id="content">
    Extra stuff here, gallery glider etc.
    <div id="block_left" >
    <?php query_posts('page_id=2&posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt(); ?>
    <?php endwhile; endif; ?>
    </div>
    
    <div id="block_middle" >
    <?php query_posts('page_id=3&posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt(); ?>
    <?php endwhile; endif; ?>
    </div>
    
    <div id="block_right" >
    <?php query_posts('page_id=4&posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt(); ?>
    <?php endwhile; endif; ?>
    </div>
    
    </div>
    
    <?php get_footer(); ?>

    main div and styling of the divs according to the design of the page.

    Thread Starter virgild

    (@virgild)

    Yup that’s what I had in mind.. but I was thinking instead of using actual pages, I’ll try to develop theme options for each block.. like you would go in theme settings and write whatever for each block and have it appear in the homepage. I know it’s farfetched considering my lack of WP experience. I guess I;m asking for some kind of tutorial or step to learn how to do this. Please help me if you can with any kind of advice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do they do this?’ is closed to new replies.