• I’ve just about got creating a an admin page for my theme, but there are two things still confusing me. Though I will stick to one thing here.

    How do you create a drop-down menu where selections can be made, for example ‘RED’, ‘YELLOW’ ‘BLUE’.

    This is not all the code for the file, don’t want to scare you off, but it is the two main bits. The other options all work fine.

    function register_mysettings() {
    	//register our settings
    	register_setting( 'vshare-settings-group', 'vshare_background_colour' );
    	register_setting( 'vshare-settings-group', 'vshare_background_image' );
    	register_setting( 'vshare-settings-group', 'vshare_copyright_info' );
    	register_setting( 'vshare-settings-group', 'vshare_copyright_colour' );
    	register_setting( 'vshare-settings-group', 'vshare_test' );
    	}

    And where I add the dro-down (I’ve included first one that is working)

    <input type="text" name="vshare_copyright_colour" value="<?php echo get_option('vshare_copyright_colour'); ?>" size="13" /><br />
    <p>
    <select size="1" name="vshare_test">
    <option>Red</option>
    <option>Black</option>
    <option>Yellow</option>
    </select>

  • The topic ‘Adding a drop-down menu in admin for a theme’ is closed to new replies.