Show selected value in a drop down menu

WordPress has a great little function built in for handling selections. <option <?php selected(‘value1’, ‘value2′);?> value=”foo”>Bar</option> You can also check out these form handling functions: checked() http://codex.wordpress.org/Function_Reference/checked disabled() http://codex.wordpress.org/Function_Reference/disabled Your HTML syntax is wrong as well. Per W3C, ‘value’ is not an attribute of the select tag. The value of a select is defined in … Read more

How to see wp-config file from WordPress dashboard?

You could create a plugin for a dashboard widget, zip, upload and activate it. Example: <?php # -*- coding: utf-8 -*- /** * Plugin Name: Configuration Dashboard Widget * Description: Show the current installation path and the content of the <code>wp-config.php</code>. * Version: 16.10.15 * Required: 4.0 * Author: Thomas Scholz * Author URI: http://toscho.de … Read more

Custom dashboard widget search box

The following will do, although it redirects to the Posts listing page /wp-admin/edit.php… Also included, search boxes for Pages and CPTs. Code /** * PLEASE NOTE THAT THE FOLLOWING CODE DOESN’T HAVE ANY SANITIZATION or NONCE methods */ add_action(‘wp_dashboard_setup’, ‘wpse_58520_dashboard_search_widget’); function wpse_58520_dashboard_search_widget() { wp_add_dashboard_widget( ‘wpse_54742_active_site_plugins’, __( ‘Search Posts/Pages/CPTs’ ), ‘wpse_58520_make_dashboard_search_widget’ ); } function wpse_58520_make_dashboard_search_widget() { … Read more

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