16 Responses

  1. Ken Newman
    Ken Newman November 1, 2010 at 4:05 pm |

    Thanks for the tutorial Justin.

    I’ve often wondered if the “add_theme_support” could or should be used by theme and plugin developers to extend functionality beyond those listed, much like your ‘my-footer-text’ example.

    In such a case, a theme would be either inheriting from the parent theme (like yours did) or in the case of plugins, from a specific plugin.

    My question is, should there be a list of ‘standard’ features somewhere so that themers can target some class of functionality rather then specific implementations? (Although, that seems like it’d be problematic due to implementation differences.)

    And also, if there was a pool of features, then some system would have to sort which conflicting implementations would be used if more then one plugin registered for a feature.

    Can you see a way for this to be workable?

    Reply
    1. Ken Newman
      Ken Newman November 4, 2010 at 12:37 pm |

      This just got added to 3.1-alpha:

      add_theme_support( 'post-formats', array( 'aside', 'image', 'etc' ) );

      Should lead to lots of fun!

      Reply
  2. Michael Thomas
    Michael Thomas November 6, 2010 at 2:32 am |

    I use WordPress often and have been trying to remove the theme support. I found the right place! Thanks!

    Reply
  3. Nathan
    Nathan November 7, 2010 at 12:18 am |

    Could this be used to turn off entire features of WordPress as well? For example, on sites where WP is being used as a CMS without any blogging functionality, could you unregister the entire Posts area?

    Is there a comprehensive list of features you could place in remove_theme_support?

    Love reading your blog by the way!

    Reply
  4. Timothy
    Timothy November 7, 2010 at 1:43 pm |

    Great tutorial, Justin, as I do my own websites. It seems WP is moving ever slowing to it’s own theme framework, such as what we see built into CakePHP and other pure frameworks.

    Reply
  5. This week’s article roundup. Tune in!
    This week’s article roundup. Tune in! November 9, 2010 at 12:41 pm |
  6. Jake Vandenhoff
    Jake Vandenhoff November 16, 2010 at 2:04 am |

    I’m just getting started with wordpress, so this stuff sounds a little complicated, but I’m definitely bookmarking this site to use once I get a handle on things, it looks like quite an excellent resource!

    Reply
  7. Get acquainted with WordPress theme-supported features
  8. Daniel Weidner
    Daniel Weidner December 14, 2010 at 11:41 am |

    Interesting, never thought about using this functionality that way. But wouldn’t it be easier for a child theme to just remove the action hook of its parent theme:

    remove_action( ‘after_setup_theme’, ‘my_require_theme_support_files’, 12 );

    On this way you could even be able to avoid an action hook call by WordPress. Or am I missing something?

    Reply
  9. Gilles
    Gilles March 15, 2011 at 9:38 am |

    Hello Justin,

    Great and very clear tutorial.

    I just found this article today and i ask myself the same question as Daniel W.

    What is the value of add_theme_support/remove_theme_support compared with the use of a simple add_action/remove_action( ‘after_setup_theme’, ‘my_require_theme_support_files’, 12 ) in this case ?

    Thank you for your clarification

    Reply
  10. Mr. Nomore
    Mr. Nomore October 5, 2011 at 12:04 pm |

    I’m trying to get my comments styling function inside an add action line. What hook do you think it would be appropriate to put it into? Should it be on the same ‘after_setup_theme’ or is there a better suit?

    Reply
  11. Chris Vendilli
    Chris Vendilli February 3, 2012 at 12:36 am |

    I don’t understand why someone would want to turn off theme support for any of WordPress’ core features but I’m sure there’s people out there who will find a need to eliminate the extra bells and whistles they don’t need.

    I always figured it’s better to have it and not need it rather than need it and not have it…

    Thanks for the tutorial, uber helpful.

    Reply

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.