WordPress.org

Ready to get started?Download WordPress

Forums

twentyten child theme - remove_action question (4 posts)

  1. cinematic
    Member
    Posted 3 years ago #

    Hi, twentyten wraps sidebar titles in <h3> tags and in my child theme I want to replace them with <div> tags. the function in functions.php of twentyten is

    [Code moderated as per the Forum Rules. Please use the pastebin]

    But to no avail. I am still having the h3-Tags in my sidebar.

    If I put the exact code in the functions.php of twentyten it will be recognized and remove_action works. Why is remove_action
    not working in my child theme?

  2. cinematic
    Member
    Posted 3 years ago #

    Sorry, didn't know about the code pasting rules

    here is my code in functions.php of my child theme
    http://wordpress.pastebin.com/qvuzMMhj

    which is meant to replace the function twentyten_widgets_init() in twenty-ten, which is defined as follows
    http://wordpress.pastebin.com/1P1HEiP3

    Strange enough it works if I post my code in functions.php of the parent theme. Does anybody have an idea why remove_action ... won't work in my child theme?

    Thanks for any hints!

  3. michaelmior
    Member
    Posted 3 years ago #

    I had the same problem and came across your post. After some more Googling, I came across the answer and I thought I would share it here.

    ThemeShaper has a post on Using Action Hooks in WordPress Child Themes. The whole series, How To Modify WordPress Themes The Smart Way is great!

  4. cinematic
    Member
    Posted 3 years ago #

    Thank you, great infos ... this is very helpful!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.