Welcome to PressWork!

Want to ask a question or join the discussion? Great! Join now.

In this Discussion

Whole Footer background color for PressWork Theme
  • Working on a new website with this theme. It's quite interesting.

    Would be nice if we could :

    - pick a background color for the whole footer, like sites like this one : http://www.gravityforms.com/
  • OlliOlli
    This answer was Accepted.
    I have a similar problem, looking for a way to create a full width footer and header just like the actual presswork site.
    (hope it's ok to post under this discussion as well!?)
  • That is actually quite easy using a Custom Action. First read this: http://presswork.me/2011/custom-css-and-custom-actions/

    Once you understand how to create a Custom Actions file, you can add this code to it:
    remove_action('pw_header_middle', 'pw_header_content');
    function custom_pw_header_content() {
    echo pw_function_handle(__FUNCTION__);
    ?>
    <div id="headerwrapper">
    <ul id="headerbanner" class="clearfix">
    <?php
    $layout = pw_theme_option('header_option');
    $layout = explode(",", $layout);
    foreach($layout as $elem) {
    pw_get_element($elem);
    }
    ?>
    </ul> <!-- end headerbanner -->
    </div> <!-- end headerwrapper -->
    <?php
    }
    add_action('pw_body_top', 'custom_pw_header_content');


    This code will first remove the header content from the default location and then add it outside of the wrapper so that you can set it to full width. I have added a surrounding div container with the ID "headerwrapper".

    With that in place I can create a Custom CSS file and add something like the following to style the background:
    #headerwrapper {
    background: #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #fff;
    -moz-box-shadow: 0 0 5px rgba(0,0,0,0.6);
    -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.6);
    box-shadow: 0 0 5px rgba(0,0,0,0.6);
    }
    image Senior Developer & Co-Founder of PressWork
  • Very cool ! Will try that. But I guess I will loose that next time I upgrade the theme to its last version, say the incoming 1.0.4 for example.

    This feature being included in a release would be better for me on the long run.

    Thanks by the way. Very nice theme.
  • pcroy said:

    But I guess I will loose that next time I upgrade the theme to its last version



    At all, you will keep your changes precisely because you will use a custom action, that's the cool thing about custom actions ! :)

    image PressWork Support Moderator
  • Works like a charm, but I have one little problem, my navigation menu is at full width too, which I intended, but only for its background and not the actual nav elements. I want to keep those centered above the content just like before. Sorry should've been more specific about that
  • @Olli The code above works best with new version 1.0.4 http://presswork.me/2012/presswork-v1-0-4-release-candidate/
    In the meanwhile put the following code in your custom css:
    #headerbanner {
    width: 716px;
    margin: 0 auto;
    }


    716px is the width I saw you use currently in your site. You 'll have to change it if you make modifications through the Toolbox.
    Post edited by cestbibi at 2012-01-17 18:27:51
    image PressWork Support Moderator