WordPress.org

Support

Support » Themes and Templates » Oenology » [Resolved] custom header

[Resolved] custom header

  • I’m going for the child theme.

    Header image
    I have a header graphic that’s 1000px 210px.
    I need to add this and make it clickable to get to the home page.
    Also whats the pro way to remove the site title text without effecting search engines? Usually I replace the title tag with the img but this theme requires a learning curve.

    How do unlink the page titles?

    Do featured images work on pages? What size do they need to be?

    How do I make the footer non sticky?

    http://growersice.com/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Theme Author Chip Bennett

    @chipbennett

    1. Header Image

    In oenology, the header image is implemented as a background image, thus it’s not clickable.

    You could adjust the line-height and width of the link that contains the header text, though, to emulate a “clickable” header image.

    2. Unlink page titles

    This is filterable, via oenology_hook_post_header_title, e.g.:

    function jknetdesign_filter_post_header_title( $title ) {
        $title = '<h1>' . get_the_title() . '</h1>'
    }
    add_filter( 'oenology_hook_post_header_title', 'jknetdesign_filter_post_header_title' );

    (Take a look at functions/hooks.php to see the full construct of the title, for further customization.)

    3. Do featured images work on pages?

    Featured images are supported for both posts and pages, but are only implemented for posts. They display in the post header, with a size of 55x55px, hard-cropped.

    There are myriad ways to display featured images in posts, depending on your needs.

    4. How do I make the footer non-sticky

    Look in style.css, line 403:
    https://github.com/chipbennett/oenology/blob/master/style.css#L403

    You’ll want to adjust:

    position:absolute;
    bottom:0;

    And you’ll probably need to adjust other related styles if you modify that.

    Regarding #2. How do disable the hyperliknk? I don’t want to remove the whole title.

    Regarding #3.
    I changed it to posititon:relative and float: left.
    Is this proper?

    Also. Where is the closing #extent tag? I want the box shadow to include the footer.

    Theme Author Chip Bennett

    @chipbennett

    Regarding #2. How do disable the hyperliknk? I don’t want to remove the whole title.

    The filter I provided should work:

    function jknetdesign_filter_post_header_title( $title ) {
        $title = '<h1>' . get_the_title() . '</h1>'
    }
    add_filter( 'oenology_hook_post_header_title', 'jknetdesign_filter_post_header_title' );

    Did it not?

    Regarding #3.
    I changed it to posititon:relative and float: left.
    Is this proper?

    For the footer? If it works for you, it’s proper. 🙂

    I’m not sure that it needs a float, but again: if that got it working for you, then great!

    Also. Where is the closing #extent tag? I want the box shadow to include the footer.

    Look in footer.php, line 156.

    Everything’s cool except #2. I tried it again and it removed the entire page title?

    Theme Author Chip Bennett

    @chipbennett

    Oops! You have to return $title:

    function jknetdesign_filter_post_header_title( $title ) {
        $title = '<h1>' . get_the_title() . '</h1>'
        // This is the part I forgot:
        return $title;
    }
    add_filter( 'oenology_hook_post_header_title', 'jknetdesign_filter_post_header_title' );

    Nice!

    One more filter for the header? How to remove the site title?

    I took this out of site-header
    oenology_hook_site_header();
    but it removed the tag line also.

    I have to leave it like that for now.

    Theme Author Chip Bennett

    @chipbennett

    I should probably make that hook a little easier. I can pass a couple additional parameters. I’ll add that to the next version.

    For now, try this:

    function jknetdesign_filter_site_header( $site_header ) {
    	// Displays the blog description, as defined on the General Settings page in the administration panel
    	$site_header = '<p>' . get_bloginfo( 'description' ) . '</p>';
    	// Return $site_header
    	return $site_header;
    }
    add_filter( 'oenology_hook_site_header', 'jknetdesign_filter_site_header' );

    (Edited to simply callback)

    Theme Author Chip Bennett

    @chipbennett

    Note: additional filter variables are now available in the development version:
    https://github.com/chipbennett/oenology/issues/110

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] custom header’ is closed to new replies.
Skip to toolbar