Return customizer setting value in functions.php

The solution was to get the customizer value inside the function, not passing the value to the function. function hn_add_inline_css() { $breakpoint = get_theme_mod( ‘setting_navigation-breakpoint’, ‘768’ ); $custom_css=” @media (min-width: ” . $breakpoint . ‘px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } …

Disable customizer control sorting within sections

What you have in the code is Backbone.js that goes together with Underscore.js. The api.panel, api.section, api.control are collections $( [ api.panel, api.section, api.control ] ).each( function ( i, values ) { var debouncedReflowPaneContents = _.debounce( api.reflowPaneContents, api.settings.timeouts.reflowPaneContents ); values.bind( ‘add’, debouncedReflowPaneContents ); values.bind( ‘change’, debouncedReflowPaneContents ); values.bind( ‘remove’, debouncedReflowPaneContents ); } ); And bind … Read more

WordPress Customizer Not Setting Custom Settings or Controls

The section you created ‘Social Media Icons’ doesn’t show because is empty it doesn’t have any control, this is because you didn’t set the correct ID in the control arguments, it should be like this in socialcustomizersection.php: // control $wp_customize->add_control( $social_site, array( ‘type’ => ‘url’, ‘label’ => $label, ‘section’ => ‘ct_alter_social_array_filter’, //it should be the … Read more

Use the customiser to set the background-image of a div

Figured it out: Firstly there is a spelling mistake in that i’m using ‘post-box-image’ instead of ‘post_box_image’… Secondly it’s better to do it this way in functions.php: function jhwd_blog_theme_customize_css() { ?> <style type=”text/css”> .post-block { background-image:url(‘<?php echo get_theme_mod( ‘post_box_image’ );?>’); background-color: <?php echo get_theme_mod( ‘post_box_color’ );?>; } .post-block>h1, .post-boxes { background-color: <?php echo get_theme_mod( ‘post_boxes_items_color’ … Read more

How to properly delete and rename the custom settings/section/control in theme customizer?

You have the value stored in the database in the cta_settings theme mod. If you want to rename your setting, then you’ll need to move the theme mod data you have stored in the database. For example: if ( get_theme_mod( ‘cta_settings’ ) ) { set_theme_mod( ‘phone_settings’, get_theme_mod( ‘cta_settings’ ) ); remove_theme_mod( ‘cta_settings’ ); }

Theme customizer API get functions

I got the solution for this → function mytheme_customize_css() { ?> <style type=”text/css”> h1 { color: <?php get_option( ‘h1_typography’ ); ?>; } </style> <?php } add_action( ‘wp_head’, ‘mytheme_customize_css’); This above might not actually be needed. just put the css element that you want to be effected In the output array: ‘output’ => array( array( ‘element’ … Read more

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