Most efficient way to use classes to create admin pages using Settings API

The example in Settings API documentation uses admin_init and admin_menu for registering custom settings and admin pages. https://developer.wordpress.org/plugins/settings/custom-settings-page/ There’s also an old Codex entry on actions typically run on front and back end requests, which can help pick a suitable action hook. https://codex.wordpress.org/Plugin_API/Action_Reference I also highly recommend the excellent old Q&A about instantiating classes in … Read more

Customize format of settings

At the moment, this is not possible. Just create your own custom settings page and place your options to it. More details and examples: https://blog.templatetoaster.com/wordpress-settings-api-creating-theme-options/

Settings Page – Option won’t save in database

The problem is that you’re not passing the correct database option name: register_setting( ‘wcs_settings_page’, // option group ‘front-page-slogan’, // database option name ); So looking at the get_option() call and the HTML input name in your front_page_slogan_callback(), the correct option name is wcs_settings: register_setting( ‘wcs_settings_page’, // option group ‘wcs_settings’, // database option name ); Check … Read more

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