WordPress.org

Ready to get started?Download WordPress

Forums

Oenology
[resolved] custom header (11 posts)

  1. jknetdesign
    Member
    Posted 1 year ago #

    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/

  2. Chip Bennett
    Theme Review Admin
    Theme Author

    Posted 1 year ago #

    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.

  3. jknetdesign
    Member
    Posted 1 year ago #

    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.

  4. Chip Bennett
    Theme Review Admin
    Theme Author

    Posted 1 year ago #

    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.

  5. jknetdesign
    Member
    Posted 1 year ago #

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

  6. Chip Bennett
    Theme Review Admin
    Theme Author

    Posted 1 year ago #

    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' );
  7. jknetdesign
    Member
    Posted 1 year ago #

    Nice!

  8. jknetdesign
    Member
    Posted 1 year ago #

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

  9. jknetdesign
    Member
    Posted 1 year ago #

    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.

  10. Chip Bennett
    Theme Review Admin
    Theme Author

    Posted 1 year ago #

    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)

  11. Chip Bennett
    Theme Review Admin
    Theme Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.