Thanks for your help on this. I fixed the code. There was only one = sign so it assigned the variable rather than doing the if - then statement. It needs two ( == ) in order to make the proper IF Then statement. Right below else { $post_order = 'asc'; $post_time_order = 'ASC'; } Add if ($forum_id ==...