Shortcode or placeholder for theme options page?

I am using shortcodes. But you need to work differently with this and make it easier for the client. On the theme options page you should have inputs with type=”checkbox” where the client chooses what share buttons to appear. In the template you should get the option with get_option(‘registered_option’) and display those buttons for which … Read more

Updating Style From WP Options Setting Page

I think you have to solve this with jQuery. If checked -> addClass, if not -> removeClass. Here’s how to enqueue your JS file: add_action(‘admin_menu’, ‘fwds_plugin_settings’); function fwds_plugin_settings() { $hook = add_menu_page( ‘Price Display’, ‘Price Display’, ‘add_users’, ‘fwds_settings’, ‘fwds_display_settings’ ); add_action( “admin_print_scripts-$hook”, ‘fwds_print_scripts’ ); } function fwds_print_scripts() { wp_register_script( ‘my-fx’ , plugin_dir_url( __FILE__ ) . … Read more

Error on using __FILE__ for add_menu_page() Function

Your code should work (not how you expect but it should work), and probably the error was in something that you didn’t post. However… __FILE__ is a constant: you don’t have to use quotes when write it. Remove them like so: add_menu_page(‘Item Display’,’Item Display’,’administrator’, __FILE__, function(){ }); If you use the quotes, ‘__FILE__’ became a … Read more

WordPress two sidebar layout or theme

In your “Blank Slate” starter theme: STEP I: Open the functions.php and find the word: “register_sidebar”. Inside the blankslate_widgets_init() function, paste the following codes just after the register_sidebar() ends, but inside the blankslate_widgets_init() function (before closing second braces – ‘}’): register_sidebar( array ( ‘name’ => __(‘Left Widget Area’, ‘blankslate’), ‘id’ => ‘secondary-widget-area’, ‘before_widget’ => ‘<li … Read more

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