Convert an theme options page to use in customize.php also?

You need to add a control to it. function mytheme_customize_register( $wp_customize ) { $wp_customize->add_section( ‘mytheme_options’, array( ‘title’ => __( ‘MyTheme Options’, ‘ppr’ ), ‘priority’ => 35, ‘description’ => __(‘Allows you to customize some example settings for MyTheme.’, ‘ppr’), ) ); $wp_customize->add_setting( ‘link_textcolor’, array( ‘default’ => get_option( ‘your_theme_page_option_value’ ), THIS IS THE OPTION NAME YOU CREATED … Read more

PHP files included in functions.php don’t seem to work

I always break my functions.php up into more managable, specific functionality files, for instance, all footer related functions goes into a file called footer-functions.php and pagination functions goes into a file called pagination-functions.php. This way, my code stays organised, managable and I don’t kill my functions.php. This however, is only related to theme specific functions, … Read more

Customizer Add Section argument ‘active_callback’ => “is_front_page” not working

The problem was I had multiple loops that each had different queries on the front page. After making sure to reset them each time, this problem resolved itself. For instance, my new query and loop looks like this: query_posts( array( ‘category_name’=>”Cloud, Customer Engagement, Developers, Executive Thought Leadership, Networking, Services, Solutions, Team Engagement”, ‘showposts’=>8, ‘order’=>DESC )); … Read more

Customizer options

The easiest solution is to put it in your functions.php file in your theme’s directory. All the code in functions.php is automatically executed when the theme is active. If the code in the file gets too much you can choose to divide it in smaller files and include those files in functions.php EDIT You should … Read more

Customizer Show/Hide

get_theme_mod() has a second parameter where you can set the default value, the value to use if the option is not set. So, if the default value is “1”, you can use: get_theme_mod( ‘display_header_image_title’, ‘1’ ) Then, if there is not value for display_header_image_title (no value in database), “1” is used. So, you could check … Read more

How do i remove the ‘WooCommerce’ section from Customizer in Twenty Sixteen Theme?

WooCommerce adds itself to the customizer as a “panel”, not a “section”. Add this to your my_customize_register() function and it will be gone: $wp_customize->remove_panel( ‘woocommerce’ ); References: woocommerce/includes/customizer/class-wc-shop-customizer.php line 31 As a rule of thumb, when you want to remove something (a customizer section, an action or filter, etc.) looking for how it is added … Read more

Customizer field value into functions.php variable

Sure, every setting in the Customizer is saved either as a theme mod (by default) or option (if you set the ‘type’ to ‘option’ in $wp_customize->add_setting()). You can access the user-defined value using get_theme_mod() (or get_option()). In your example, the value you are looking for can be retrieved with: $downloads_tab_text = get_theme_mod( ‘product-downloads-tab’ );

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