• I have been working on a custom admin and things are going good. I got it submitted with ajax, I got all the options in one database entry. My issue now is that I want to add another option in the same section but it doesn’t seem to be working. I am using jquery tabs to break up my sections. So I have three sections right now in three tabs. One section for each tab and one input for each tab. I went to add a second input in tab 1 and found that it is duplicating everything.

    so for example

    
    register_setting('my_admin_options','option_name','');
    
    add_settings_section('main_section','Main Settings','section_cb','home_settings');
    
    add_settings_field('introText','Intro Text','home_settings','home_settings','main_section','');
    add_settings_field('copywrite','Footer Copywrite','home_settings','home_settings','main_section','');
    

    what I ended up with is the intro text twice and the copywrite right behind it also twice. I see tha values in the database but obviously doing something wrong.

The topic ‘help with wordpress admin code’ is closed to new replies.