How to replace a javascript select box onchange event to a form submit action?

It’s not working because:

  • You are redirecting home
  • You don’t listen for the $_GET variable so the archive link is just appended to your home url

You need to add a function that listens for that $_GET variable.

just add this to your functions.php file

add_action( 'template_redirect', 'wpse_archive_select' );
function wpse_archive_select(){

  if( isset( $_GET[ 'archive-dropdown' ] ) ){
    die( wp_safe_redirect( $_GET[ 'archive-dropdown' ] ) );
  }
}