Cloning/replicating/copying dashboard admin settings
Cloning/replicating/copying dashboard admin settings
Cloning/replicating/copying dashboard admin settings
File input returns null in theme options array
It looks like you are using the Settings API to add images to a gallery or slideshow. As @kuchenundkakao suggested, a post type would be a good choice especially if you will have multiple slides, or if you will use different slides inside different galleries. If you don’t need a custom post type (it is … Read more
Theme Options page under Appearance are added by this function. <?php add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function ); ?> To make it appear outside as a top level menu page replace it with following. <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function,$icon_url, $position ); ?> Where $page_title :The text to be displayed in the title tags … Read more
I think you would need to edit the appropriate stylesheet so that the divs using the class “wrap” float to the left of each other. If “wrap” is being used elsewhere by WordPress I would give this a new name such as “mywrap.” You might also want to give that a width of 20% with … Read more
So you have created a custom option using the Settings API. Lets say you have created an option called footer-text you can display it in your theme using <?php echo get_option( ‘footer-text’ ); ?>. Essentially you are echoing the result that is stored in the wp_options table for the option called footer-text. It is advised … Read more
You need to be able to edit the theme itself (or as a child theme) to make that change – obviously the theme options aren’t giving you that option. Chances are that in your header.php or similar you are going to find code that pulls those values from the Theme Options page. That’s what you … Read more
After did many trials and errors, finally I found the answer. Just in case anyone wondering how this working, I put the full code right here : /* == THEME OPTIONS == */ add_action(“admin_menu”, “setup_theme_admin_menus”); function setup_theme_admin_menus() { add_submenu_page(‘themes.php’, ‘Generate Coupons’, ‘Generate Coupons’, ‘manage_options’, ‘generate-coupons-elements’, ‘theme_generate_coupons_settings’); } function theme_generate_coupons_settings() { ?> <div class=”wrap”> <?php screen_icon(‘themes’); … Read more
Right, jumped the gun again and just wasn’t thinking. You can delete the transient cache when sanitizing the options data. When you create a function to sanitizing the options by adding in the code to delete the transient here, the transient is deleted when you click on save settings.
Answer is update_blog_option(). This is specific for each blog. If I used get_user_option() it would be different for each user. If I used get_site_option() it would be across all sites on the network.