Improving this link color picker code

Create customizer.js file and put the following script in the customizer.js file (function( $ ) { “use strict”; wp.customize( ‘tcx_link_color’, function( value ) { value.bind( function( to ) { $( ‘a’ ).css( ‘color’, to ); } ); }); })( jQuery ); And enqueue your customizer.js file by using wp_enqueue_script in your customizer.php file like this … Read more

My code for creating an admin option doesn’t work

Make Sure Your Functions, Slug and Callback Functions are Unique(Means Different from any other plugin or default WordPress). Also to save options use Settings API http://codex.wordpress.org/Function_Reference/register_setting <?php add_action(‘admin_menu’, ‘add_unique_custom_options’); function add_unique_custom_options() { add_options_page(‘Global Custom Options’, ‘Global Custom Options’, ‘manage_options’, ‘unique-functions’,’unique_custom_options’); } function unique_custom_options() { ?> <div class=”wrap”> <h2>Global Custom Options</h2> <form method=”post” action=”options.php”> <?php wp_nonce_field(‘update-options’) … Read more

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