Get WordPress page Id inside customizer

I think you work about the ajax call. Inside the theme, in the right frame works all default WP functions inside the loop. But if you get the post inside the customizer you can use the ajax call and get the id from the URL. Source Example JavaScript add_action( ‘wp_ajax_fb_custom’, ‘fb_customizer_ajax’ ); function fb_customizer_ajax() { … Read more

How to pass variables from one function to another or combine functions

There are 2 ways that would be the most simple. Do it with a function call. Make the variables global. The first would be done like so: function my_func() { $styles=”stuff”; second_func($styles); } function second_func($styles) { // do something with $styles var_dump($styles); } The second way would be done like so: // Set global variable … Read more

How do you add a link in the description of one section of the customizer to another section in a different panel?

The relevant line that generates that link in wp-includes\class-wp-customize-nav-menus.php is $description .= ‘<p>’ . sprintf( __( ‘You can also place menus in <a href=”https://wordpress.stackexchange.com/questions/248853/%s”>widget areas</a> with the &#8220;Custom Menu&#8221; widget.’ ), “javascript:wp.customize.panel( ‘widgets’ ).focus();” ) . ‘</p>’; and the more relevant part of it javascript:wp.customize.panel( ‘widgets’ ).focus();” ) so it seems like the key for … Read more

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