<?php /* Peek Theme ------------- header.php Header template file */ // get featured image $featured_image = peek_featured_image(); // build the body class array $body_class = array(); if (is_front_page()) { $body_class[] = 'front'; } if (is_admin_bar_showing()) { $body_class[] = 'admin-bar'; } if ($featured_image) { $body_class[] = 'splash'; } else { if (peek_front_gallery() && is_front_page()) { $body_class[] = 'splash'; } else { $body_class[] = 'no-splash'; } } ?> <!DOCTYPE html> <html lang="en"> <head>
/** * Function to get the post title */ function peek_get_post_title() { $title = get_the_title(); $output = false; if (!is_singular()) { // if listed $permalink = get_permalink(); $output = '<h2 class="entry-title"><a href="' . $permalink . '" rel="bookmark">' . $title . '</a></h2>'; } else { if (is_front_page()) { // if front page if (peek_show_home_title()) { $output = '<h1 class="entry-title">' . $title . '</h1>'; } } else { if (!peek_featured_image()) { // if is singular // if not the front page // if not featured image $output = '<h1 class="entry-title">' . $title . '</h1>'; } } } return $output; }