How to Disable Color Options?

In TwentyTen’s functions.php the custom background is added in twentyten_setup() which is called on the action ‘after_setup_theme’. So, in your child theme, the following should remove the option completely: // Higher priority to work after TwentyTen add_action( ‘after_setup_theme’, ‘wpse12934_remove_custom_background’, 20 ); function wpse12934_remove_custom_background() { remove_custom_background(); }

How to reduce repetitive code

You can define your own custom functions in PHP just like you would in JavaScript. Here’s your code example rewritten using a function: $page = get_page_by_title(‘Excerpts Showreel’); <– This piece of code will change // the code below will never change. function get_my_content( $page ) { $my_id = $page; $post_id = get_post($my_id, ARRAY_A); $title = … Read more

How to assign the default file at “Appearance > Editor”?

Unfortunately you can’t control what files are loaded on that page… But you can disable the editor page and provide the user with theme options that allow him to include his own CSS. To deal with this I’m creating and activating a child theme automatically if possible: if(!is_child_theme()){ require_once(ABSPATH.’wp-admin/includes/file.php’); if(!WP_Filesystem()){ // fail, proably no write-access, … Read more