ThemeShaper Forums » Thematic

[closed]

3 Basic Thematic Questions

(3 posts)
  • Started 4 years ago by fedude
  • Latest reply from fedude
  • This topic is resolved
  1. fedude
    Member

    These may be dumb questions to some, but it will help me understand this behemoth.

    1. If I want to modify an action, I need to remove the existing action before adding a new action. True or False?

    2. If I want to modify a filter, I need to remove the existing filter before adding a new filter. True or False? (If true, how do I remove a filter?)

    3. If I want to modify category.php, all I need to do is copy it from the thematic folder into my child theme folder and edit away. When the theme runs it will find the modified category.php file to use. True or False?

    TIA

    Posted 4 years ago #
  2. fedude
    Member

    #3 - YES. category.php in the directory of your child theme will be used before the category.php in the thematic theme.

    Posted 4 years ago #
  3. fedude
    Member

    OK, I've answered my own quesstions:

    If an action already exists, it must be removed and before new code can be put in it's place. Here is how an action is removed:

    function remove_actions() {
    	remove_action('thematic_categoryloop', 'thematic_category_loop');
    }
    add_action('init', 'remove_actions');

    Functions containing filters can just be substituted. Wherever the call is to the function containing the filter just substitute a new function for it and at the bottom of the function include your filter. The key here is to substitute a new function in the calling routine. I wasn't able to just include a function with the same name in my functions.php file.

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.