Missing hashtag with theme customizer header color

Already fixed it. When saving it to the database the hashtag is filtered out. So with echoing the color, I just put a hashtag before it, like this: function cloudboxx_customize_register( $wp_customize ) { //All our sections, settings, and controls will be added here $wp_customize->add_setting( ‘header_textcolor’ , array( ‘default’ => “#000000”, ‘transport’ => ‘refresh’, ) ); … Read more

Load get_page_templates into select menu

Reading the documentation: List of choices for ‘radio’ or ‘select’ type controls, where values are the keys, and labels are the values. And again for get_page_templates(): Return value: (array) Where key is the name of the template and value is the filename. Thus we can conclude: ‘choices’ => array_flip( get_page_templates() ), Now I’m spoiling you

HTML inside Customizer

I’ve had a look inside of the theme you’ve mentioned that does this. It seems like the code below (inside the zerif_customizer.js) file is what is making this button. jQuery(‘.preview-notice’).append(‘<a class=”zerif-upgrade-to-pro-button” href=”http://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/” class=”button” target=”_blank”>{pro}</a>’.replace(‘{pro}’,zerifLiteCustomizerObject.pro)); This can be found in the themes js file. They’ve then hooked this file onto the customizer in the functions.php file … Read more

Return value of get_background_color

To add custom background support in your theme you need to register the default custom background support. Example:- add_action(‘after_setup_theme’, function(){ add_theme_support( ‘custom-background’, array( ‘default-color’ => ‘black’ //Default color )); }); Now you will see a new section Background Image in customizer and in Color you will see a new option Background color Once you will … Read more

customizer live preview layout picker

You don’t need javascript, just change the class using the get_theme_mod variable e.g. <?php $layout = get_theme_mod(’embee_layout_section_options[site_layout]’, ‘3’); $class=””; if($layout == ‘1’) { $class=”this”; } elseif($layout == ‘2’) { $class=”that”; } ?> <div class=”<?php echo $class; ?>”> // stuff </div> Put that in your template file e.g. page.php and the live customizer will pick it … Read more

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