How can I style my theme admin page?

In your construct function you also need to enqueue a custom stylesheet that will house the CSS to style up your theme options. A simplified example would look like this: function admin_style() { wp_enqueue_style( ‘theme-options-style’, get_template_directory_uri().’styles/theme-options-style.css’); } add_action(‘admin_enqueue_scripts’, ‘admin_style’);

Multiple Address In WP-Option Value

After testing for hours, finally get it done. Here the solution: In database wp_options change the value for siteurl and home from your wordpress url to /path/to/wordpress WordPress URL Path To WordPress Then add these code in the bottom of wp-config.php define(‘WP_HOME’, ‘http://’ .$_SERVER[‘HTTP_HOST’].”https://wordpress.stackexchange.com/”); define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . “https://wordpress.stackexchange.com/” ); Now you can use … Read more

Widget options – where to put them?

I have answered this myself by adding an options page and adding options to the database. The functions are add_option(‘yourpluginoption1′,’value’); add_option(‘yourpluginoption2′,’value’); add_action(‘admin_menu’, ‘yourplugin_menu_’); function yourplugin_menu_() { add_options_page(‘etc etc…

Only show theme option if it option exists

If you’re wanting to output based on the option being defined, then use isset(). e.g. this: <?php echo $up_options->slideshow6; ?> …becomes this: <?php if ( isset( $up_options->slideshow6 ) ) { echo $up_options->slideshow6; } ?> EDIT How would I get the following to appear only if “slideshow6” was defined <a href=”#”><img src=”<?php echo $up_options->slideshow1; ?>” alt=”#”/></a> … Read more

Importing WP settings to another host

Follow the steps: Copy/Move all files to new location Export database from old mysql server and import data in new server (you can use phpmyadmin for that) Select wp_options table using phpmyadmin from new location. Edit 2 entry in option table with option name home and siteurl . set option value = new location url … Read more

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