ThemeShaper Forums » Thematic

[closed]

Hook above/below content similar to #index-top

(19 posts)
  • Started 9 years ago by stengl
  • Latest reply from webstandardcss
  • This topic is not resolved
  1. stengl
    Member

    Hi everybody,

    A couple of questions:

    1) I want to get rid of the header > how to?
    2) I want to inser my own coded header just above the last post an/or #index-top being displayed. Unfortunatley, there is no hook for that and I do not want to change the styling of #index-top. Any ideas how to acomplish that?

    The result should be a right sidebar that gos all the way up the page and a header only as wide as a regular post.

    Ideas?

    gretings

    Posted 9 years ago #
  2. stengl
    Member

    To clarifiy, if you take a look at this overview: http://bluemandala.com/thematic/thematic-structure.html I want to insert my own header in #container, above #content.

    Posted 9 years ago #
  3. stengl
    Member

    *bump*

    Posted 9 years ago #
  4. Hi Stephan,

    sorry .. I'm busy with some projects.

    I'll include the needed hooks into the next SVN revision this evening. Will drop a note as soon as it is available.

    Chris

    Posted 9 years ago #
  5. stengl
    Member

    Hi Chris,

    Awsome. Looking forward for your implementation. My site has to go live on thursday, so if everything fails I will have to hack the core-files and adapt it with the next release.

    Thanks in advance. This is going to become a coding night :)

    Posted 9 years ago #
  6. .. it won't fail :)

    Posted 9 years ago #
  7. ADDED: New action hooks: thematic_abovecontent and thematic_belowcontent

    Revision 648

    Chris

    Posted 9 years ago #
  8. stengl
    Member

    ¡Muchas gracias! … I'm on it ;)

    Posted 9 years ago #
  9. stengl
    Member

    Hm strange. It does not work for both arguments. Ist it me?

    function header_in_content($header) {
         	$header =  '<div id="header">';
            $header .= 'Hello World!';
            $header .= '</div>';
            return $header;
    }
    add_action('thematic_abovecontent','header_in_content');
    Posted 9 years ago #
  10. Testing.

    Posted 9 years ago #
  11. .. it's echo not return :)

    Posted 9 years ago #
  12. function header_in_content($header) {
         	$header =  '<div id="header">';
            $header .= 'Hello World!';
            $header .= '</div>';
            echo $header;
    }
    add_action('thematic_abovecontent','header_in_content');
    Posted 9 years ago #
  13. stengl
    Member

    awsome, echo works. Strange though, with all other hooks I use return ;)

    Thanks Chris!

    Posted 9 years ago #
  14. You use return for filter hooks.

    Posted 9 years ago #
  15. stengl
    Member

    Yup, you just made my day Chris ;)

    Unfortunatley, I still have an issue. When I use a hook like:


    // Header einfügen
    function header_in_content($header) {
    $header = '<div id="header-logo"><h1 class="header-title">' . bloginfo('title') . '</h1></div>';
    echo $header;
    }
    add_action('thematic_abovecontent','header_in_content');

    I get HTML like:

    <div id="container">
    BlogURL BlogTITL <div id="header-logo"><h1 class="header-title"></h1></div>
    <div id="content">

    The bloginfo('url') and bloginfo('title') are not inserted in the right position. I can't figure out why.

    Posted 9 years ago #
  16. This is once again something about echo & return :)

    bloginfo() echoes the result
    get_bloginfo() returns the result

    If you want to build a string containing the title, you need to use get_bloginfo().

    Chris

    Posted 9 years ago #
  17. stengl
    Member

    Thanks a lot! Lesson learned ;)

    One last thing. I want to get rid of the obsolet header div. But with

    function remove_header()
    {
    remove_action('thematic_header', 'thematic_brandingopen', 1);
    remove_action('thematic_header', 'thematic_blogtitle', 3);
    remove_action('thematic_header', 'thematic_blogdescription', 5);
    remove_action('thematic_header', 'thematic_brandingclose', 7);
    remove_action('thematic_header', 'thematic_access', 9);
    }
    add_action('init', 'remove_header');

    … I only can delete the functions, but not the main header divs themselves.
    Is there a way to remove the header completley?

    Posted 9 years ago #
  18. Hi Stephan,

    the only way to remove the header div is to copy header.php to your child theme's directory and edit this file.

    I could move open / close div into thematic_header() but this might break a couple of child theme's.

    There's another idea, but I need to work on this a bit more.

    Chris

    Posted 9 years ago #
  19. @stengl You can set the empty #header div to display: none; and give your header a new ID name.

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.