I already tried this in my original code:
// the loop
if (have_posts()) : while (have_posts()) : the_post();
$temp_id = $post->ID;
$temp_title = get_the_title($post->ID);
if(!is_user_logged_in()){
$temp_link = "login.php";
} else {
$temp_link = get_permalink($post->ID);
}
$temp_content = get_the_content($post->ID);
$temp_ex = get_the_excerpt();
This, however, crashed the entire site, forcing me to SSH into my server and revert the changes via Nano.