WordPress.org

Forums

[resolved] Has anyone widgetized Perlas-10? (7 posts)

  1. twoalone
    Member
    Posted 8 years ago #

    Wondering if anyone has 'widgetized' the Perlas-10 theme? If not, I'll give it a shot...

    (might wanna duck b/c it'll be my first dig into coding) :S

  2. Without a link to the theme, it's difficult to tell you exactly how to widgetize it.

  3. twoalone
    Member
    Posted 8 years ago #

  4. twoalone
    Member
    Posted 8 years ago #

    I've read the instructions on Automatic over and over trying to figure this out on my own because I know the forums are busy. still can't figure it out.

    If someone could show me where to insert the beginning and ending 'if' statement to make the 2 columns on the right widget friendly, I'd really appreciate your help. (thanks)

    <!-- begin sidebar -->
    <div id="rightcol">
    <div id="topper">
    <h2 id="about">About me</h2>
    <p> <br>about text.</p>
    <p class="right"><a href="#" class="more"></a></p>
    </div>
    <div id="secondcol">
    <h2 id="news">Last post</h2>
    <ul>
    <li><?php get_archives('postbypost', 10); ?> </li>
    </ul><br/>
    <h2 id="news">Pages</h2>
    <ul>
    <li><?php wp_list_pages('title_li='); ?></li>
    </ul>
    </div>
    <div id="thirdcol">
    <h2 id="links">Categories</h2>
    <ul>
    <li><?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?></li>
    </ul><br/>
    <h2 id="links">Archives</h2>
    <ul>
    <li><?php wp_get_archives('type=monthly'); ?></li>
    </ul><br/>
    <ul>
    <?php get_links_list(); ?>
    </ul>

    </div> <!-- Ends the third column -->
    <!-- end sidebar -->

  5. Evita
    Member
    Posted 8 years ago #

  6. Put this in functions.php (no blank lines are allowed outside the php tags in this file!):
    <?php
    if ( function_exists('register_sidebar') )
    register_sidebars(2, array(
    'before_widget' => '',
    'after_widget' => '<br />',
    'before_title' => '<h2 id="%1$s" class="widget %2$s">',
    'after_title' => '</h2>',
    ));
    ?>

    Then change the sidebar.php as follows:
    Change this:
    <div id="secondcol">
    <h2 id="news">Last post</h2>

    into this:
    <div id="secondcol">
    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar(1) ) : ?>
    <h2 id="news">Last post</h2>

    Change this:
    </ul>
    </div>
    <div id="thirdcol">
    <h2 id="links">Categories</h2>
    <ul>

    into this:
    </ul>
    <?php endif; ?>
    </div>
    <div id="thirdcol">
    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar(2) ) : ?>
    <h2 id="links">Categories</h2>
    <ul>

    And change this:
    </ul>
    </div> <!-- Ends the third column -->
    <!-- end sidebar -->

    into this:
    </ul>
    <?php endif; ?>
    </div> <!-- Ends the third column -->
    <!-- end sidebar -->

  7. twoalone
    Member
    Posted 8 years ago #

    Otto42 - thank you so much for you help.

Topic Closed

This topic has been closed to new replies.

About this Topic