ThemeShaper Forums » Thematic

[closed]

move #access above #branding but stay in #header

(6 posts)
  • Started 8 years ago by louisJ
  • Latest reply from louisJ
  • This topic is resolved
  1. louisJ
    Member

    Hi

    I wanted my access above the branding so I added this in the functions.php:
    //Display Thematic menu above header...from http://www.catswhocode.com/blog/thematic-wordpress-theme-toolbox-10-extremely-useful-hooks
    function remove_thematic_actions() {
    remove_action('thematic_header','thematic_access',9);
    add_action('thematic_aboveheader','thematic_access',9);
    }
    add_action('wp','remove_thematic_actions');

    However it moves access out of the header area.
    Is it possible to keep access in the header area and above branding?

    thanks

    Posted 8 years ago #
  2. yeah you also need to move thematic_brandingopen from priority 1 to priority 2. then you can put thematic_access at priority 1. it will then be above #branding and still in #header

    function remove_thematic_actions() {
    remove_action('thematic_header','thematic_brandingopen',1);
    remove_action('thematic_header','thematic_access',9);
    }
    add_action('init','remove_thematic_actions');
    
    add_action('thematic_header','thematic_access',1);
    add_action('thematic_header','thematic_brandingopen',2);
    Posted 8 years ago #
  3. I happened to run across http://forums.themeshaper.com/topic/change-position-number-of-an-action-hook which is a different solution, but seems to also work.

    @helgatheviking, is there anything bad about using zero for priority? I think I have even seen a negative in a snippet related to positioning.


    // remove current menu
    function remove_access() {
    remove_action('thematic_header', 'thematic_access', 9);
    }
    add_action('init', 'remove_access');
    // add menu to its new position
    add_action('thematic_header', 'thematic_access', 0);

    Posted 8 years ago #
  4. louisJ
    Member

    thanks helgatheviking
    but those lines mess with the header-aside area I added in the header....weird.
    However your method ScottNix works well for me.

    Do you have any idea why helgatheviking?

    Thanks to both of you.

    Posted 8 years ago #
  5. mess w/ the header aside? well i didn't know you had a header-aside... but how so?

    @scott- i guess i just didn't know you could put a zero priority. makes sense though.

    Posted 8 years ago #
  6. louisJ
    Member

    @helgatheviking The header-box disappears totally and the size of branding changes like this:
    http://img846.imageshack.us/i/capture6.png/

    Do you want to see my functions.php?

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.