' . $more_link_text . ''; } } endif; /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and graphene_continue_reading_link(). * Based on the function from Twenty Ten theme. * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * * @since Graphene 1.0.8 * @return string An ellipsis */ function graphene_auto_excerpt_more( $more ) { return apply_filters( 'graphene_auto_excerpt_more', ' … ' . graphene_continue_reading_link() ); } add_filter( 'excerpt_more', 'graphene_auto_excerpt_more' ); /** * Add the Read More link to manual excerpts. * * @since Graphene 1.1.3 */ function graphene_manual_excerpt_more( $text ){ global $post, $graphene_settings, $graphene_in_slider; if ( $graphene_in_slider ) return $text; $has_excerpt = has_excerpt(); if ( $has_excerpt && ! $graphene_settings['show_excerpt_more'] ) return $text; $has_more = preg_match( '//', $post->post_content, $matches ); if ( ! $has_excerpt && ! $has_more ) return $text; if ( $has_more ) { if ( $text != graphene_truncate_words( $text, $graphene_settings['excerpt_length'], '' ) ) return $text; } $text = explode( '
', $text ); $text[count( $text )-2] .= graphene_continue_reading_link(); $text = implode( '', $text ); return $text; } add_action( 'the_excerpt', 'graphene_manual_excerpt_more' ); if ( ! function_exists( 'graphene_posts_nav' ) ) : /** * Posts navigation */ function graphene_posts_nav( $args = array() ){ global $wp_query, $graphene_settings; $defaults = apply_filters( 'graphene_posts_nav_defaults', array( 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, 'base' => '', 'format' => '', 'add_fragment' => '', 'type' => 'post', 'prev_text' => '', 'next_text' => '' ) ); $args = wp_parse_args( $args, $defaults ); $paginate_args = array( 'current' => $args['current'], 'total' => $args['total'], 'prev_text' => $args['prev_text'], 'next_text' => $args['next_text'], 'type' => 'array', 'echo' => false, 'add_fragment' => $args['add_fragment'], ); if ( $args['base'] ) $paginate_args['base'] = $args['base']; if ( $args['format'] ) $paginate_args['format'] = $args['format']; if ( $args['type'] == 'comment' ) $links = paginate_comments_links( apply_filters( 'graphene_comments_nav_args', $paginate_args ) ); else $links = paginate_links( apply_filters( 'graphene_posts_nav_args', $paginate_args ) ); if ( $links ) : ?>
post_type ); ob_start(); ?> post_parent ) return; $title = get_the_title( $post->post_parent ); $permalink = get_permalink( $post->post_parent ); ?> queried_object ){ $term = $wp_query->queried_object; $tax = $term->taxonomy; } else { $tax = $wp_query->tax_query->queries[0]['taxonomy']; $term = $wp_query->tax_query->queries[0]['terms'][0]; $term = get_term_by( 'slug', $term, $tax ); } if ( ! $term ) return; if ( $term->description ) : ?>