treehouse : what would you like to learn today?
Web Design Web Development iOS Development

editable areas

  • Hello, I'm new to wordpress and will be building a gaming site. On the main page I'll have my blog but some areas that show a featured sections or something. I want those areas/sections editable. Here just an example pic I found online http://web3mantra.com/wp-content/uploads/2011/03/psd-website-template24.jpg

    Where it says "Multiple Options", "Shortcodes included" and "Updated Support"

    I would like to have sections like that but be able to edit it from time to time easily.

    How would I go about making this?
  • You will need to create multiple Wordpress sidebars for each column.

    In your theme file you will add something like the following.


    <div class="column-wrap">
    <div class="column col1"><?php dynamic_sidebar( 'col1' ); ?></div>
    <div class="column col2"><?php dynamic_sidebar( 'col2' ); ?></div>
    <div class="column col3"><?php dynamic_sidebar( 'col3' ); ?></div>
    </div>


    And in you theme's functions.php file add the following.


    register_sidebar( array(
    'name' => __( 'Column 1' ),
    'id' => 'col1',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    register_sidebar( array(
    'name' => __( 'Column 2' ),
    'id' => 'col2',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    register_sidebar( array(
    'name' => __( 'Column 3' ),
    'id' => 'col3',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );


    After some basic styling to get them to float side by side you should be good to go.

    Hope this helps! I may not have explained well enough, let me know if you run into issues.
  • alright I'll give this a shot tonight and see what happens. Thanks