• Resolved pglove

    (@pglove)


    When I scan my site with the nibbler site tester website it reveals that my header logo has no alt text or dimensions set.

    I can’t figure out where to put changes in my sub-theme header.php.

    I want to set my header as h1 and retrieve the width & height of the header logo, ideally alt text too if possible, using php calls like it does in the 2012 theme.

    Unfortunately I can’t seem to get my head around the CC header file.

    Any help with this much appreciated ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • have a look in core/includes/theme-generator/theme-generator.php

    there you can find the header logo function.

    search for “header_logo” throughout the theme.

    The clean way would be to make a child theme,
    with a blank functions.php and then simply use remove_action (google for it;) to remove the function “header_logo” from the related action hook.

    write your own logo function with the html inside as you like.
    You can simply copy and modify our logo function and change to your HTML.

    Then hook the function via an add_action to the new place you like the logo to be.

    hope this was some useful hint!

    you’ll have some stuff to learn and google and lookup in the wordpress codex. ??

    have a great weekend, konrad

    Thread Starter pglove

    (@pglove)

    Thanks konrad, I still have tons to learn about php, but have successfully implemented a child theme with a functions file. It’s very useful knowing I can mess around with the files without risking breaking my site.

    remove_action was a very useful pointer, thanks again for your help!

    awesome, great to hear this! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Header Image has no meta’ is closed to new replies.