get_pages Drop down list for selection of a page
You already have <option value=””>…</option> you just need some extra attrs for it You need to load current value and if value equals $page->ID than add attr selected=”selected” Here’s how it could be done: <select name=”easyreg_redirect_page”> <option selected=”selected” disabled=”disabled” value=””><?php echo esc_attr( __( ‘Select page’ ) ); ?></option> <?php $selected_page = get_option( ‘option_key’ ); $pages … Read more