do_action('graphene_top_menu'); ?> </div> <?php do_action('graphene_before_content'); ?> <div id="content" class="clearfix hfeed"> <?php do_action('graphene_before_content-main'); ?> <?php /* Sidebar2 on the left side? */ if (in_array(graphene_column_mode(), array('three_col_right', 'three_col_center', 'two_col_right'))) { get_sidebar('two'); } /* Sidebar1 on the left side? */ if (in_array(graphene_column_mode(), array('three_col_right'))) { get_sidebar(); } ?> <div id="content-main" <?php graphene_grid('clearfix', 16, 11, 8); ?> > <?php do_action('graphene_top_content');
* if it has any. */ global $post, $graphene_settings; if ($graphene_settings['child_page_listing'] == 'show_always' || $graphene_settings['child_page_listing'] == 'show_if_parent_empty' && $post->post_content == '') { /* Don't list the child pages if the global $post variable is empty, which usually indicates it's not the standard WordPress pages */ if (!$post || function_exists('is_bbpress') && is_bbpress()) { return; } /* Get the child pages */ $args = array('post_parent' => $post->ID, 'orderby' => 'menu_order title', 'order' => 'ASC', 'post_type' => 'page', 'posts_per_page' => -1); $pages = new WP_Query(apply_filters('graphene_child_pages_args', $args)); if ($pages->have_posts()) { ?> <div <?php graphene_grid('child-pages-wrap', 16, 11, 8, true); ?> > <?php while ($pages->have_posts()) { $pages->the_post(); ?> <div class="post child-page page" id="page-<?php the_ID(); ?> "> <div class="entry"> <div class="entry-content clearfix"> <?php /* The post thumbnail */ if (has_post_thumbnail(get_the_ID())) {
/** * Creates the functions that output the slider */ function graphene_slider() { global $graphene_settings, $graphene_in_slider; $graphene_in_slider = true; if ($graphene_settings['slider_display_style'] == 'bgimage-excerpt') { graphene_set_excerpt_length(35); } do_action('graphene_before_slider'); ?> <?php /* Generate classes for the slider wrapper */ $class = array('featured_slider', 'clearfix'); $class[] = $graphene_settings['slider_display_style']; $class[] = $graphene_settings['slider_animation']; /* For backward compatibility */ if ($graphene_settings['slider_display_style'] == 'bgimage-excerpt') { $class[] = 'full-sized'; } $class = apply_filters('graphene_slider_class', $class); $class = implode(' ', $class); ?> <div class="<?php echo $class; ?> "> <?php do_action('graphene_before_slider_root'); ?> <div id="slider_root" class="clearfix"> <?php do_action('graphene_before_slideritems'); ?> <div class="slider_items"> <?php /* Get the posts to be displayed */ $sliderposts = graphene_get_slider_posts(); /* Display each post in the slider */ $slidernav_html = ''; $i = 0; while ($sliderposts->have_posts()) { $sliderposts->the_post(); $style = ''; /* Slider background image*/ if ($graphene_settings['slider_display_style'] == 'bgimage-excerpt') { $image = graphene_get_slider_image(get_the_ID(), 'graphene_slider', true); if ($image) { $style .= 'style="background-image:url('; $style .= is_array($image) ? $image[0] : $image; $style .= ');"'; } } $slider_link_url = esc_url(graphene_get_post_meta(get_the_ID(), 'slider_url')); if (!$slider_link_url) { $slider_link_url = get_permalink(); } $slider_link_url = apply_filters('graphene_slider_link_url', $slider_link_url, get_the_ID()); ?> <div <?php graphene_grid('slider_post clearfix', 16, 11, 8, true, true); ?> id="slider-post-<?php the_ID(); ?> " <?php echo $style; ?> > <?php do_action('graphene_before_sliderpost'); ?> <?php if ($graphene_settings['slider_display_style'] == 'bgimage-excerpt') { ?> <a href="<?php echo $slider_link_url; ?> " class="permalink-overlay"><span><?php _e('View full post', 'graphene'); ?> </span></a> <?php } ?> <?php if ($graphene_settings['slider_display_style'] == 'thumbnail-excerpt') { ?> <?php /* The slider post's featured image */ ?> <?php $slider_img_setting = graphene_get_post_meta(get_the_ID(), 'slider_img'); if ($slider_img_setting != 'disabled' && !(($slider_img_setting == 'global' || $slider_img_setting == '') && $graphene_settings['slider_img'] == 'disabled')) { $image = graphene_get_slider_image(get_the_ID(), apply_filters('graphene_slider_image_size', 'thumbnail')); if ($image) { ?> <div class="sliderpost_featured_image"> <a href="<?php echo $slider_link_url; ?> "><?php echo $image; ?> </a> </div> <?php } } ?> <?php } ?> <div class="slider-entry-wrap clearfix"> <div class="slider-content-wrap"> <?php /* The slider post's title */ ?> <h2 class="slider_post_title"><a href="<?php echo $slider_link_url; ?> "><?php the_title(); ?> </a></h2> <?php /* The slider post's excerpt */ ?> <div class="slider_post_entry clearfix"> <?php if ($graphene_settings['slider_display_style'] != 'full-post') { the_excerpt(); ?> <?php if ($graphene_settings['slider_display_style'] == 'thumbnail-excerpt') { ?> <a class="block-button" href="<?php echo $slider_link_url; ?> "><?php _e('View full post', 'graphene'); ?> </a> <?php } ?> <?php } else { the_content(); } ?> <?php do_action('graphene_slider_postentry'); ?> </div> </div> </div> </div> <?php $slidernav_html .= '<a href="#"' . ($i == 0 ? ' class="active"' : '') . '><span>' . get_the_title() . '</span></a>'; $i++; } wp_reset_postdata(); ?> </div> </div> <?php /* The slider navigation */ ?> <div class="slider_nav"> <?php echo $slidernav_html; ?> <?php do_action('graphene_slider_nav'); ?> </div> </div> <?php do_action('graphene_after_slider'); graphene_reset_excerpt_length(); $graphene_in_slider = false; }
<?php /* Page title, which is the user's nicename */ ?> <h2 <?php graphene_grid('post-title', 13, 8, 5); ?> ><?php echo ucfirst(get_the_author_meta('display_name')); ?> </h2> <?php /* Post content */ ?> <div <?php graphene_grid('entry-content clearfix', 13, 8, 5); ?> > <?php /* Author's details */ ?> <h4 class="author-first-heading"><?php _e("Author's details", 'graphene'); ?> </h4> <p> <?php if (get_the_author_meta('user_firstname') != '' || get_the_author_meta('user_lastname') != '') { /* translators: %1$s is the first name, %2$s is the last name */ printf(__('<strong>Name:</strong> %1$s %2$s', 'graphene'), get_the_author_meta('user_firstname'), get_the_author_meta('user_lastname'));
<?php /** * The Sidebar 2 for display in the content page. * Is only called by header.php or footer.php if the sidebar is needed, so no checking is required! * * @package Graphene * @since graphene 1.0 */ global $graphene_settings; ?> <div id="sidebar2" <?php graphene_grid('sidebar', 1, 5, 4); ?> > <?php do_action('graphene_before_sidebar2'); ?> <?php /* Widgetized sidebar, if supported. */ if (!is_front_page() && is_active_sidebar('sidebar-two-widget-area')) { // Not home, display normal sidebar if active dynamic_sidebar('sidebar-two-widget-area'); } elseif (is_front_page() && !$graphene_settings['alt_home_sidebar'] && is_active_sidebar('sidebar-two-widget-area')) { // Home, but alternate sidebar disabled, display normal sidebar if active dynamic_sidebar('sidebar-two-widget-area'); } elseif (is_front_page() && $graphene_settings['alt_home_sidebar'] && is_active_sidebar('home-sidebar-two-widget-area')) { // Home, alternate sidebar enabled, display alternate sidebar if active
/** * Adds the content panes in the homepage. The homepage panes are only displayed if using a static * front page, before the comments. It is also recommended that the comments section is disabled * for the page used as the static front page. */ function graphene_homepage_panes() { global $graphene_settings, $graphene_defaults, $in_homepage_panes; $in_homepage_panes = true; // Get the number of panes to display if ($graphene_settings['show_post_type'] == 'latest-posts' || $graphene_settings['show_post_type'] == 'cat-latest-posts') { $pane_count = $graphene_settings['homepage_panes_count']; } elseif ($graphene_settings['show_post_type'] == 'posts') { $pane_count = count(explode(',', $graphene_settings['homepage_panes_posts'])); } // Build the common WP_Query() parameter first $args = array('orderby' => 'date', 'order' => 'DESC', 'post_type' => array('post', 'page'), 'posts_per_page' => $pane_count, 'ignore_sticky_posts' => 1); // args specific to latest posts if ($graphene_settings['show_post_type'] == 'latest-posts') { $args_merge = array('post_type' => array('post')); $args = array_merge($args, $args_merge); } // args specific to latest posts by category if ($graphene_settings['show_post_type'] == 'cat-latest-posts') { $args_merge = array('category__in' => graphene_object_id($graphene_settings['homepage_panes_cat'], 'category')); $args = array_merge($args, $args_merge); } // args specific to posts/pages if ($graphene_settings['show_post_type'] == 'posts') { $post_ids = $graphene_settings['homepage_panes_posts']; $post_ids = preg_split("/[\\s]*[,][\\s]*/", $post_ids, -1, PREG_SPLIT_NO_EMPTY); // post_ids are comma seperated, the query needs a array $post_ids = graphene_object_id($post_ids); $args_merge = array('post__in' => $post_ids, 'orderby' => 'post__in'); $args = array_merge($args, $args_merge); } // Get the posts to display as homepage panes $panes = new WP_Query(apply_filters('graphene_homepage_panes_args', $args)); $count = 0; ?> <?php do_action('graphene_before_homepage_panes'); ?> <div class="homepage_panes"> <?php while ($panes->have_posts()) { $panes->the_post(); $count++; $alpha = $omega = false; if ($count % 2) { $alpha = true; } else { $omega = true; } ?> <div <?php graphene_grid('homepage_pane clearfix', 8, 5, 4, $alpha, $omega); ?> id="homepage-pane-<?php the_ID(); ?> "> <?php do_action('graphene_homepage_pane_top'); ?> <a href="<?php the_permalink(); ?> " title="<?php printf(__('Permalink to %s', 'graphene'), esc_attr(get_the_title())); ?> "> <?php /* Get the post's image */ if (has_post_thumbnail(get_the_ID())) { $image = get_the_post_thumbnail(get_the_ID(), 'graphene-homepage-pane'); } else { $image = graphene_get_post_image(get_the_ID(), 'graphene-homepage-pane', 'excerpt'); } if ($image) { echo apply_filters('graphene_homepage_pane_image', $image, get_the_ID()); } ?> </a> <?php /* The post title */ ?> <h3 class="post-title"> <a href="<?php the_permalink(); ?> " title="<?php printf(__('Permalink to %s', 'graphene'), esc_attr(get_the_title())); ?> "><?php the_title(); ?> </a> <?php do_action('homepage_pane_title'); ?> </h3> <?php /* The post excerpt */ ?> <div class="post-excerpt"> <?php the_excerpt(); do_action('graphene_homepage_pane_content'); ?> </div> <?php /* Read more button */ ?> <p class="post-comments"> <a href="<?php the_permalink(); ?> " title="<?php printf(__('Permalink to %s', 'graphene'), esc_attr(get_the_title())); ?> " class="block-button"><?php _e('Read more', 'graphene'); ?> </a> </p> <?php do_action('graphene_homepage_pane_bottom'); ?> </div> <?php } wp_reset_postdata(); ?> </div> <?php do_action('graphene_after_homepage_panes'); unset($in_homepage_panes); }
<div <?php graphene_grid('post page', 16, 11, 8, true); ?> > <div class="entry clearfix"> <h2 class="post-title entry-title"><?php _e('Not found', 'graphene'); ?> </h2> <div class="entry-content"> <p> <?php if (!is_search()) { _e("Sorry, but you are looking for something that isn't here. Wanna try a search?", "graphene"); } else { _e("Sorry, but no results were found for that keyword. Wanna try an alternative keyword search?", "graphene"); } ?> </p> <?php get_search_form(); ?> </div> </div> </div> <?php do_action('graphene_not_found');
</div> </div> <?php /** * Display the post author's bio in single-post page if enabled */ if ($graphene_settings['show_post_author']) { ?> <h4 class="author_h4 vcard"><?php _e('About the author', 'graphene'); ?> </h4> <div class="author-info clearfix"> <div <?php graphene_grid('author-avatar-wrap', 2, 2, 2, true); ?> > <?php if ($author_imgurl = get_the_author_meta('graphene_author_imgurl')) { echo '<img class="avatar" src="' . $author_imgurl . '" alt="" />'; } else { echo get_avatar(get_the_author_meta('user_email'), graphene_grid_width('', 2)); } ?> </div> <p class="author_name"><strong><?php the_author_meta('display_name'); ?> </strong></p> <div class="author_bio"><?php