default custom background image not saved in database when creating a new site

I assume you mean “get_theme_mod(‘background_image’) returns false” before I “save it once to activate it” If that is the case, get_theme_mod accepts a default parameter. Check the Codex: $name (string) (required) Theme modification name. Default: None $default (boolean|string) (optional) Default: false Pass your default image as the second parameter to that function and you should … Read more

How to add button to top of theme customizer?

If you take a look at the source code of this part … do_action( ‘customize_controls_print_styles’ ); do_action( ‘customize_controls_print_scripts’ ); ?> </head> <body class=”<?php echo esc_attr( $body_class ); ?>”> <div class=”wp-full-overlay expanded”> <form id=”customize-controls” class=”wrap wp-full-overlay-sidebar”> <div id=”customize-header-actions” class=”wp-full-overlay-header”> <?php $save_text = $wp_customize->is_theme_active() ? __( ‘Save &amp; Publish’ ) : __( ‘Save &amp; Activate’ ); submit_button( … Read more

change the Theme dynamically

Filter pre_option_stylesheet. Sample code, not tested: add_filter( ‘pre_option_stylesheet’, ‘wpse_100854_switch_stylesheet’ ); function wpse_100854_switch_stylesheet( $false ) { if ( empty ( $_GET[‘theme’] ) return $false; $themes = wp_get_themes( array( ‘allowed’ => true ) ); if ( isset ( $themes[ $_GET[‘theme’] ] ) ) return $_GET[‘theme’]; return $false; } The URL should look like example.com/?theme=theme_directory_slug. To change just … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)