How to add styles set by user in the customizer

I haven’t clarified what is the best method to apply styles from the customizer. However, this is the function i am using right now (Not using the previous one anymore, therefore, you can remove the wp_add_inline_style part): // I like this way so much more that i’m going to cry. // Thanks to: // https://code.tutsplus.com/tutorials/settings-and-controls-for-a-color-scheme-in-the-theme-customizer–cms-21350 … Read more

Bind JS event to WordPress control customizer

You need to enqueue a separate script on a different action with a different dependency. /** * Enqueue styles and scripts for the Customizer pane. */ function mytheme_customize_pane_enqueue() { wp_enqueue_script( ‘mytheme-customizer-control’, get_template_directory_uri() . ‘/js/customizer-control.js’, array( ‘customize-controls’ ), ‘20180924’, true ); } add_action( ‘customize_controls_enqueue_scripts’, ‘mytheme_customize_pane_enqueue’ ); The JS looks like this: ( function( wp, $ ) … Read more

How To Remove or Hide Appearance->Background from Admin Menu

Try adding a filter instead. See this answer for more details add_filter(‘admin_menu’, ‘admin_menu_filter’,500); function admin_menu_filter(){ if (! is_admin()){ remove_submenu_page( ‘themes.php’, ‘background.php’); } } Also double check your link to the page from the admin menu. More details in the WordPress Codex To remove a settings page for plugins that use a slug like /wp-admin/options-general.php?page=certain-plugin-settings use … Read more

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