hide expired job second edition

Hi I tried the code form different support threads here. It does not work. If I put the code in my functions.php or upload to mu plugin folder all jobs are hidden also these which are active. I want to see jobs on my homepage as well as on my jobs-archive page.

Can you please help me so expired jobs are hidden? This should be default in the plugin settings.

thx and kind regards R.