WordPress.org

Ready to get started?Download WordPress

Forums

Remove admin menu items Header and Background from Twenty Ten Child (5 posts)

  1. Annie Boccio
    Member
    Posted 3 years ago #

    I want to simply remove the links to Header and Background from the Appearance menu in the admin for a Twenty Ten child theme. I know I can just comment them out in the Twenty Ten functions.php but that defeats the purpose of using a child theme in the first place.

    Is there something I can add to my child theme functions.php that basically says "ignore what Twenty Ten is allowing you to do and don't add those links"?

    (note: I only want to remove the links, no need to remove anything else.)

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    You could try replicating the relevant functions in your child theme's functions.php file but leave the functions empty. Or, if appropriate, remove the filters in the child's function.php file.

  3. Annie Boccio
    Member
    Posted 3 years ago #

    Thanks for the response, esmi.

    The Twenty Ten functions.php calls the Background function with only
    add_custom_background(); with no arguments, nothing to leave empty. It simply turns on the built in functionality in WP3.0. This gets passed through my child theme. What I'd like to do is set up a road block in my child theme functions.php.
    Is there an argument I could add that would tell my child theme to ignore this function?

    In the meantime I've converted the theme to a standalone instead of a child theme to solve the issue but it's not my first choice.

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Try replicating the twentyten_setup() function in your child theme but remove the reference to add_custom_background();.

  5. Annie Boccio
    Member
    Posted 3 years ago #

    That did the trick, thanks! I guess I was both overlooking the obvious and hoping for some new "remove" function to materialize :).

Topic Closed

This topic has been closed to new replies.

About this Topic