Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3953656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:00:05+00:00 2026-05-20T02:00:05+00:00

I am creating a theme options page for my theme, and I want to

  • 0

I am creating a theme options page for my theme, and I want to alert users when their options have been saved. Any idea how? Below is my code what I am using in the functions.php code.

function themeoptions_page() { 
    if ( $_POST['update_themeoptions'] == 'true' ) { themeoptions_update(); }  
?>
<div class="wrap">
    <div id="icon-themes" class="icon32"><br /></div>  
    <h2>JJTheme Options</h2>
    <br><br>
    <form method="POST" action="">
        <label for="enable-header">
            Enable Header Image?
            <input type="checkbox" <?php echo (get_option('enableheader')) ? 'checked="checked"' : ''; ?> value="true" id="enable-header" name="enable-header">
        </label>
        <br><br>
        <label for="footer">Footer (HTML Allowed)</label>
        <textarea class="large-text code" cols="50" rows="3" name="footer"><?php echo get_option('footer'); ?></textarea>
        <br><br>
        <label for="ga">Google Analytics Code</label>
        <textarea class="large-text code" cols="50" rows="3" name="ga"><?php echo get_option('ga'); ?></textarea>
        <br><br>
        <input type="submit" value="Save Settings" name="save_menu" class="button-primary menu-save">
        <input type="hidden" name="update_themeoptions" value="true">  
    </form>
</div>

<?php
}

add_action('admin_menu', 'themeoptions_admin_menu');  

function themeoptions_update() {
    if ($_POST['enable-header'] == 'true') { $header = true; } else { $header = false; }  
    update_option('enableheader', $header);
    update_option('footer', $_POST['footer']);
    update_option('ga', $_POST['ga']);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:00:05+00:00Added an answer on May 20, 2026 at 2:00 am

    Try this before the form. Let me know if it working. Thanks!

        if($_REQUEST['updated'] == 'true') {
                echo '<div><p>Theme Options Saved! </p></div>
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Frustrated SO regular here: I'm creating a theme-options.php page for a child theme in
I have a searcher page with a sidebar with filter options and, when you
I'm creating a Facebook wall page, and i don't want the events showing in
I have been configuring a wordpress theme for a month now, but know I
I'm creating a search engine for my asp page.There are 15 pieces filtering options
I am creating a web application using EJBs and servlets. I have a page
I'm creating a form on a web page, but I want that form to
I've been making an events page for a community website I'm creating. It allows
I have created a custom content type and using views2 for creating various page-views.
In the Wordpress Settings API, creating a new options page usually starts out with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.