ThemeShaper Forums » Thematic


how can i edit "header-extensions.php"

(11 posts)
  • Started 11 years ago by js09
  • Latest reply from helgatheviking
  • This topic is not resolved


  1. js09

    I know CSS and a little PHP but this shit is confusing. If I want to do something extremely simple such as remove the blog title and description, how can I do this with my 'child theme'? I completely did an overhaul on an older site with this template but didn't use a child theme and just edited everything on the original files.. which worked great.

    Anyway, I copied over the example child theme that was provided and renamed it to 'my blog theme v1'. I then threw in the functions.php from the parent theme.

    This (functions.php) is where I make my changes, correct? I've tried throwing in some 'remove' code and can't even update the page without it giving me some header error.

    For example:
    // remove thematic_access()
    function remove_access() {

    What is 'access', is it a 'hook'? Or a 'filter'?
    Ok, so 'remove_access' removes whatever 'access' is. How about 'remove_action'? Something is removed twice?

    And what does '9' mean?

    I'm not sure why there isn't a simple description page on what this all represents.


    Posted 11 years ago #
  2. js09

    Here is what I added to my functions.php which is located in my child theme directory. This did nothing... it did not remove anything.

    // Remove default Thematic actions
    function remove_thematic_actions() {

    Posted 11 years ago #
  3. js09

    What happens when I input some bad php code, hit 'save', and then can't even reload the page due to an error? All it lists is a 'header' error at the top of the screen and I can't even get back into the editor to fix it - lol.

    Posted 11 years ago #
  4. you don't put the () in the remove action statement... and the remove_action (same w/ add_filter and add_action) is of the order:


    you were putting the function name first. this will remove the blogtitle from the thematic_header:

    // Remove default Thematic actions
    function remove_thematic_actions() {

    as for your last post, i would recommend you test/edit things on a local install (check out XAMPP and google installing wordpress locally). if you are working live, then you ought to be uploading edits via FTP (i use fireftp, an addon for Firefox).

    i hope you are not editing header-extensions.php but rather functions.php in your CHILD theme.. and not the thematic folder. When things go really bonkers, I have had to delete my functions.php and rebuild it piece by piece until I locate the bit of code that is breaking everything.

    Posted 11 years ago #
  5. js09

    I've since figured everything out. Way too much trial and error. I am working all from the functions.php

    The last two primary tasks I still need to figure out is how I can import my own custom header php file (using code that would go in functions.php - should be easy) and how I can have each post on the home page display the comments... have no luck with that one.


    Posted 11 years ago #
  6. Hi Helga,

    This explains how to remove the Blog title which is great, but how does one now add it again in the functions.php file? I have to implement translation of the site and need to do this directly in the header-extensions.php if it is not possible through the functions.php file.

    Many thanks,

    Posted 9 years ago #
  7. you merely use add_action to put it on a different hook for example:


    it is always the same, over and over, everywhere in wordpress

    also, i was fairly certain that thematic was translation ready... what are you translating that isn't already translation ready. perhaps you should open you own thread for that.

    Posted 9 years ago #
  8. Thanks Helga. I will try that!

    I am using WPML to translate and entire site from English to Afrikaans, hence the reason I need to ability to make changes to that eader-extensions.php without touching the file in thematic.

    Many thanks again ;)

    Posted 9 years ago #
  9. I see now how that works, but I still need hard access to that file to be able to add the WPML code snippet so unfortunately, I will have to make the change in the header-extensions.php.

    Unless I can rewrite the header section in the functions.php file?

    Thanks again.

    Posted 9 years ago #
  10. middlesister

    Almost all of the header sections is changeable through filters and hooks. What is it you need to edit, and where do you want to add your code?

    I have built a site with WPML before and I didn't need to do too much edits, but that was an older version and I don't know how it has changed since then. Basically i replaced #access with a custom one with the wpml navigation menu and language switcher, and registered the footer text on the theme options page for translation with wpml.

    On a side note, if there is something specific that you miss that is needed for smooth integration with WPML do tell what you need. Thematic has built in compatibility code for several plugins. Maybe something for WPML could be added to Thematic so you wouldn't need to jump through hoops to make it work.

    Posted 9 years ago #
  11. agreed. there is very little you can't change in header.php through hooks/filters... probably only a few div IDs or classes. and there is pretty much nothing you can't change in header-extensions.php. so do tell what you need to change. once you figure out 1 function process and 1 filter process, they are all the same.

    additionally, right now is a terrible time to go hacking header-extensions.php so that you can't upgrade, b/c the thematic 1.0 release is in theme review and due to be approved at any time.

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.