Can I customize my header when using the Freelance theme?

Community Forums Forums Design Tips and Tricks Can I customize my header when using the Freelance theme?

This topic is: not resolved

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

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

    Flourish
    Participant

    I am working on customizing a studiopress theme “Freelance” and having a lot of trouble figuring out how to customize the header.

    What I am working on is at the following url http://www.blog.theknittingdude.com

    And I am trying to add a wholesale section between the logo and the search box that looks the same as this site  http://www.theknittingdude.com

     

    I can’t even figure out where to edit the header file to edit.

    Any ideas from the gurus?

     

    Thanks!

    http://blog.theknittingdude.com
    #42252

    marybaum
    Participant
    Post count: 128

    First, forgive me if I add instructions that are obvious to you or sound way below your coding level. Dollars to donuts your php is better than mine, so I’m writing this as if I were writing to me, or to another designer-turning-developer like me.

    The header file you to edit doesn’t exist in the Freelance chile them, and it isn’t even the one in the top level ov the theme – it’s the one in lib/structure. So you actually want to copy the lib/structure folders to your Freelance directory and put your copy of that header.php in there.

    Now if you’re a better phper than I am, you already know you want to edit the function genesis_do-header – around line 881 in my copy of Taco html editor.

    function genesis_do_header() {

    echo ‘<div id=”title-area”>’;
    do_action( ‘genesis_site_title’ );
    do_action( ‘genesis_site_description’ );
    echo ‘</div><!– end #title-area –>’;

    if ( is_active_sidebar( ‘header-right’ ) || has_action( ‘genesis_header_right’ ) ) {
    echo ‘<div class=”widget-area”>’;
    do_action( ‘genesis_header_right’ );
    add_filter( ‘wp_nav_menu_args’, ‘genesis_header_menu_args’ );
    dynamic_sidebar( ‘header-right’ );
    remove_filter( ‘wp_nav_menu_args’, ‘genesis_header_menu_args’ );
    echo ‘</div><!– end .widget-area –>’;
    }

    }

     

    what I would do is this:

    function genesis_do_header() {

    echo ‘<div id=”title-area”>’;
    do_action( ‘genesis_site_title’ );
    do_action( ‘genesis_site_description’ );
    echo ‘</div><!– end #title-area –>’;

    if ( is_active_sidebar( ‘wholesale’){

    echo ‘<div class=”wholesale”>’;
    echo ‘</div><!– end .wholesale –>’;

    }

    if ( is_active_sidebar( ‘header-right’ )|| has_action( ‘genesis_header_right’ ) ) {
    echo ‘<div class=”widget-area”>’;

    do_action( ‘genesis_header_right’ );
    add_filter( ‘wp_nav_menu_args’, ‘genesis_header_menu_args’ );
    dynamic_sidebar( ‘header-right’ );
    remove_filter( ‘wp_nav_menu_args’, ‘genesis_header_menu_args’ );
    echo ‘</div><!– end .widget-area –>’;
    }

    }

    Then edit the Freelance child theme’s functions.php file to register the new widget area.

    genesis_register_sidebar (array(

    ‘name’=>’wholesale’,
    ‘id’ => ‘wholesales’,
    ‘description’ => ‘This is the wholesale div of the header.’

    ));

    and add the class .wholesale to your stylesheet.

    I haven’t actually tried this to make sure it works, but I did open the files in my code eitor – as always, more experienced php coders feel free to add corrections or improvements.


    Be it ever so run down, there’s no place like FriendFeed. ;-)

    #42254

    marybaum
    Participant
    Post count: 128

    Also, it looks as if your site works ag http://blog.theknittingdude.com but not http://www.blog.theknittingdude.com. If the Freelance install you’re working on is just going to be a subdomain, that explains it – the www may just have been fingers on autopilot. If it were me, that would be my excuse! ;-)

    Mary


    Be it ever so run down, there’s no place like FriendFeed. ;-)

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

You must be logged in to reply to this topic.