WordPress.org

Ready to get started?Download WordPress

Forums

remove_custom_background()? (5 posts)

  1. Carl-Fredrik Herö
    Member
    Posted 4 years ago #

    I'm creating a child-theme to TwentyTen and need to disable the custom background and custom image header.

    I tried to use remove_theme_support but those two are blacklisted since and admin-section is included.

    Any ideas?

    Thanks in advance!

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    write your own version of the function twentyten_setup() { ... }
    in the functions.php of your child theme, not including the calls for custom background and custom header, only copying what you want to keep.

  3. greatdanemaniac
    Member
    Posted 4 years ago #

    I too have a similar problem, but instead I'd like to add my own adjustments to the visual editor. I've tried to follow the instructions in the comments of the twentyten theme's function.php file, but it doesn't work.

    Alchymyth: Can you give me a correct example of another version of the twentyten_setup function that you mentioned? I don't really know how to do it.

    This is my code that I started with:

    <?php
    
    			add_action( 'after_setup_theme', 'my_child_theme_setup', );
     				 function my_child_theme_setup() {
    
    		// This theme styles the visual editor with editor-style.css to match the theme style.
    	add_editor_style();
    
    	}
    		?>

    I'd appreciate any help I can get. Thanks!

  4. alchymyth
    Forum Moderator
    Posted 4 years ago #

    i haven't worked with it before, however, it seems that the function
    add_editor_style();
    which should call the default css file, does not do it in a child theme;
    http://codex.wordpress.org/Function_Reference/add_editor_style

    adding a css file name into the function, like so, worked for me:
    add_editor_style('twentyten_child_editor_style.css');
    - the styles in this css file are adapted by the tinyMCE editor.

    i didn't use the add_action( 'after_setup_theme', 'my_child_theme_setup', ); method;

    the line
    add_editor_style('twentyten_child_editor_style.css');
    is simply in my 'twentyten_setup()' function of my TwentyTen child theme (see below):

    function twentyten_setup() { 
    
    	// This theme styles the visual editor with editor-style.css to match the theme style.
    	add_editor_style('twentyten_child_editor_style.css');
    
    	// This theme uses post thumbnails
    	add_theme_support( 'post-thumbnails' );
    ...
    ...
    ...

    hope his helps ;-)

  5. greatdanemaniac
    Member
    Posted 4 years ago #

    Thanks!
    Yes, it worked like a charm!!! Now, I've solved one of the two mysteries with child themes. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic