ThemeShaper Forums » Thematic


Getting rid of excess template files

(6 posts)
  • Started 9 years ago by stonefree
  • Latest reply from helgatheviking
  • This topic is resolved


  1. I recently started using Thematic and after an initial struggle with the learning curve, have come to love it and use it for all my projects now.

    One thing I can't figure out is how to deal with the large number of templates in the Thematic parent folder when using a child theme. I don't want tag.php, category.php , etc - I want them to revert to index.php .I know I can simply delete them from the parent theme, but that doesn't seem like the best way to do it, since an update would replace them. Nor do I want to make copies of index.php and rename them, since a change to index would require changes to everything else.

    Anyone know the solution?

    Posted 9 years ago #
  2. well they aren't especially different?

    this might not be a complete solution, but you can create 1 default loop and then set all your other loops to be the same.

    function default_loop(){
      echo "we like bacon!";

    and so on.

    Posted 9 years ago #
  3. Thank you for the reply Helga. Its' not the loop I'm concerned with it's everything else on the page. For example if I have the sidebar or below_container commented out on index (but not page), I would have to comment it out on all the other pages. Or if I just want to add some markup to index.php without having to go through action hooks.

    Posted 9 years ago #
  4. gosh, someone else was just concerned about thematic_abovecontainer. BOTH above and belowcontainer are EMPTY hooks. unless you add something to them then you don't NEED to remove it- nothing will show there. if you DO add something to it, but don't want it to show everywhere then you need to add it conditionally.

    to construct your own logic please check out the WP codex on conditional tags

    here is how to get rid of the sidebar wherever you don't want it:

    Posted 9 years ago #
  5. OK I think I just need to use conditional tags more. I understand that many of the hooks are empty. I was concerned if I had above_container doing something on a page but didn't want it on the index, I'd have to also remove it on category.php, tag.php, etc. Or if I had additional code or markup on index.php and would have to be copy it to tag.php, etc. But it sounds like conditional tags for hook functions are the way to go and also not to add anything directly to index.php and use hooks instead. Thanks for your help!

    Posted 9 years ago #
  6. exactly. just explained the same thing over here:

    once you understand hooks and filters, conditional logic is the missing piece

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.