Add div before widgets in agency pro theme:

Community Forums Forums Design Tips and Tricks Add div before widgets in agency pro theme:

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  jgk 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #121425

    jgk
    Participant
    Post count: 25

    Hi,

    I’m using the agency pro theme. I’ve tried to find an answer to this but can’t find anything.

    I’m trying to make one background image for both the div .footer-widgets and footer.site-footer in this theme.

    I figure the easiest way to do this was to start a div with class=”foot” just before the footer widgets and end the div after the footer. And then set the background image of that div and turn off the background colors on the enclosed div’s.

    does anyone know how to do this with functions.php? It doesn’t seem to work with the genesis simple hooks plugin.

    Thanks so much!

    http://necronomicon.studioissa.com/
    #121426

    braddalton
    Participant
    Post count: 9789

    I think you need to wrap it all in a div.

    Couldn’t you remove both and then add back wrapped in the div?


    #121920

    jgk
    Participant
    Post count: 25

    Thanks Brad how do I do that?

    Thanks so much.

    Jay

    #122097

    jgk
    Participant
    Post count: 25

    Hey so I’m trying to add a div that surrounds both the widgets and footer, so that I can make a single background image that covers both of them. Here’s what I have so far for functions.php:

    //Add foot div to enclose
    function wpsites_add_div() {
    echo ‘<div class=”foot”>’;
    };
    /**
    * @author Brad Dalton
    * @link http://wp.me/p1lTu0-9Wx
    */
    add_action(‘genesis_after_content_sidebar_wrap’, ‘wpsites_add_div’);

    //Remove Existing Footer
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );

    //Add in new Widget areas
    function genesischild_extra_widgets() {
    genesis_register_sidebar( array(
    ‘id’ => ‘footercontent’,
    ‘name’ => __( ‘Footer’, ‘genesischild’ ),
    ‘description’ => __( ‘This is the general footer area’, ‘genesischild’ ),
    ‘before_widget’ => ‘<div class=”footercontent”>’,
    ‘after_widget’ => ‘</div></div>’,
    ) );
    }

    add_action( ‘widgets_init’, ‘genesischild_extra_widgets’ );

    //Position the Footer Area
    function genesischild_footer_widget() {
    genesis_widget_area (‘footercontent’, array(
    ‘before’ => ‘<div class=”footercontainer”>’,
    ‘after’ => ‘</div>’,));
    }

    It isn’t working because genesis is automatically closing the div.foot. Is there any way around this?

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

You must be logged in to reply to this topic.