Anyone added a custom home widget on Streamline?

Community Forums Forums Design Tips and Tricks Anyone added a custom home widget on Streamline?

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  casm 1 year, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11822

    casm
    Participant
    Post count: 1

    I am looking for help to customise the streamline theme with a home-bottom widget area so I can place a page below the three featured page widget areas at the top.

    I have experimented with registering the widget area as per the instructions in the code snippets section but when I save the functions.php I get this message (HAVE REMOVED URL):

    “Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /nfs/c10/h03/mnt/150349/domains/REMOVEDURLFORSECURITYREASONS/html/wp-content/themes/streamline/functions.php on line 151″

    This happened to me the last time I attempted to register a widget area but everything I’ve read suggests that it is supposed to be easy.

    My client is annoyed because she only wants one post/page showing up next to the sidebar on her website and without being able to add this widget area, I can’t fix the problem.

    Can anyone help?

    Cheers,

    Cas

    #11835

    David Decker
    Moderator
    Post count: 93

    This should work in general.
    However, the error you get is for a missing or wrong syntax in your custom code. Could please post the actual code snippet you added here – or via http://pastebin.com service, and where you added in functions.php, at the top, at the very bottom or otherwise.

    Thanks, Dave :)


    #12017

    casm
    Participant
    Post count: 1

    Thanks for responding Dave.

    I have fixed the functions.php with the help of Studiopress Support and have added code to the home.php and now the widget is working but won’t show up on the home page.

    Here’s the code I used on the home.php

    <?php

    add_action( ‘genesis_meta’, ‘streamline_home_genesis_meta’ );
    /**
    * Add widget support for homepage.
    *
    */
    function streamline_home_genesis_meta() {

    if ( is_active_sidebar( ‘home-featured-1′ ) || is_active_sidebar( ‘home-featured-2′ ) || is_active_sidebar( ‘home-featured-3′ ) ) {

    add_action( ‘genesis_before_content_sidebar_wrap’, ‘streamline_home_loop_helper’ );

    }
    }
    /**
    * Display widget content for home featured sections.
    *
    */
    function streamline_home_loop_helper() {

    if ( is_active_sidebar( ‘home-featured-1′ ) || is_active_sidebar( ‘home-featured-2′ ) || is_active_sidebar( ‘home-featured-3′ ) ) {

    echo ‘<div id=”home-featured”>’;

    echo ‘<div class=”home-featured-1″>’;
    dynamic_sidebar( ‘home-featured-1′ );
    echo ‘</div><!– end .home-featured-1 –>’;

    echo ‘<div class=”home-featured-2″>’;
    dynamic_sidebar( ‘home-featured-2′ );
    echo ‘</div><!– end .home-featured-2 –>’;

    echo ‘<div class=”home-featured-3″>’;
    dynamic_sidebar( ‘home-featured-3′ );
    echo ‘</div><!– end .home-featured-3 –>’;

    echo ‘</div><!– end #home-featured –>’;

    }

    }

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    add_action( ‘genesis_loop’, ‘custom_widget’ );
    function custom_widget() {
    genesis_widget_area( ‘home-bottom’, array( ‘before’ => ‘<div
    id=”home-bottom” class=”home-bottom widget-area”>’ ) );
    }

    genesis();

    And here’s the CSS I used (I feel like I’m feeling my way in the dark here… just copied this from another blog that has done this).

    /* Home Bottom Widget Area
    ———————————————————— */
    .home-bottom .post-info{
    overflow: hidden;
    margin-right; 5px;
    padding: 0 0 25px;
    width: 100%;
    }

    What I want is for the home-bottom widget area to show instead of the blog posts.

    If you can help me figure out how to do that, I would really appreciate it.

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

You must be logged in to reply to this topic.