ThemeShaper Forums » Thematic


Modify/remove thematic markup from within child theme

(15 posts)
  • Started 5 years ago by Jonathan D. Baker
  • Latest reply from pipsologie
  • This topic is not resolved
  1. I need to do some surgery on the footer.php and header.php files from within my thematic child theme, which would consist of modifying both the php and xhtml. There isn't a hook for what in a perfect world would be called thematic_footer for example, and I simply need to rearrange the xhtml in header.php, so I'm at a loss as to how to do this with PHP.

    I do realize that I could just include a custom footer.php or header.php page in my child theme, but I've come so far with just the functions.php file in my child theme that I didn't want to give up just yet.

    Posted 5 years ago #
  2. Hi Jonathan,

    could you please provide some more details?!


    Posted 5 years ago #
  3. Hi Chris,

    For instance, in the markup

    <div id="footer">
            <?php get_sidebar('subsidiary'); ?>
            <div id="siteinfo">
        		<?php /* footer text set in theme options */ echo do_shortcode(__(stripslashes(thematic_footertext($thm_footertext)), 'thematic')); ?>
    		</div><!-- #siteinfo -->
    	</div><!-- #footer -->

    I need to be able to completely remove #siteinfo and replace it with my own markup. I'm including a small navigation menu in the footer (and a couple other elements) that for css purposes will require other <div> elements, to begin with.

    Posted 5 years ago #
  4. amygail

    There are a ton of posts on this topic.
    Do a search for 'filter content' etc

    Here's a list of hooks (including thematic_footer)

    Posted 5 years ago #
  5. Thanks for your response, but perhaps I wasn't clear enough. I need to access content that is outside of the thematic hooks, like the <div id="siteinfo"> that is hard-coded into the footer.php file. I've used hooks to filter and action the rest of my child-theme, but need a way to modify some of the XHTML markup that resides outside (or in between, depending on how you view them) the various PHP hooks.

    Also, I have been unable to find thematic_footer hook you speak of...

    Posted 5 years ago #
  6. Hi Jonathan,

    currently we don't have any plans to create filters for the standard markup.

    Copy the PHP file to your child theme directory and change it.


    Posted 5 years ago #
  7. TheEditor

    *Which* PHP file?

    Posted 3 years ago #
  8. dude you just resurrected a year old thread and were very vague in your question relating to it. my guess is that since the OP is talking about overwriting markup in footer.php that chris is saying the OP should copy footer.php into his child theme and make the edits there. any file in the childtheme will override the file of the same name in the parent. ie... footer.php in the child folder will take precedence over footer.php in thematic.

    Posted 3 years ago #
  9. TheEditor

    No, I was referring to the location where the siteinfo variable is stored, the one that can be adjusted on the admin options page. I'm trying to learn this framework and it would be helpful to see where stuff is stored. I've done a global search of all files and cannot find where the siteinfo value is stored.

    Posted 3 years ago #
  10. ah ok. now i understand.

    the siteinfo exists as 3 functions in thematic/library/extensions/footer-extensions.php


    which all hook into thematic_footer.

    and as you learn the framework- you will find yourself referencing the extensions folder a lot. there is where most of the meat and potatoes of thematic are hiding.

    Posted 3 years ago #
  11. TheEditor

    Thanks much; I'll take a look.

    Posted 3 years ago #
  12. TheEditor

    Helga, thank you much for your help. I can see now that the footer/siteinfo is handled in the footer-extensions file and relies on info drawn from shortcodes.php and theme-options.php.

    And that my machine at work isn't searching PHP files properly.

    Posted 3 years ago #
  13. I still don't understand: I want to remove the siteinfo from the #footer and add it to thematic_belowfooter(). How can I do that?

    Posted 2 years ago #
  14. @pipsologie - the same way you add and remove anything in thematic. start by reading my primer on hooks and filters

    first you'll remove all the functions i mentioned above. then you will add them to the thematic_belowfooter() hook.

    Posted 2 years ago #
  15. @helgathewiking - thanks a lot!
    I finally succeeded with your help to remove entirely the siteinfo from its original place>

    function remove_original_siteinfo() {
    remove_action('thematic_footer','thematic_siteinfo', 30);
    remove_action('thematic_footer','thematic_siteinfoclose', 40);
    add_action('init', 'remove_original_siteinfo');

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.