';
}
}
endif;
if ( ! function_exists( 'themeora_post_author_meta' ) ) :
/**
* Displays author information under posts
* @since themeora 1.0
*/
function themeora_post_author_meta() {
if( get_theme_mod( 'show_author_bio' ) == true ) {
if ( 'post' == get_post_type() && get_the_author_meta('first_name') != '' && get_the_author_meta('last_name') != '') { ?>
autoembed($embed_url);
echo do_shortcode( $media );
?>
ID, $imagesize );
//$caption = $attachment->post_excerpt;
//$caption = ($caption) ? "
$caption
" : '';
$alt = ( !empty($attachment->post_content) ) ? $attachment->post_content : $attachment->post_title;
if ( $i == 1 ) {
echo "
";
}
else {
echo "
";
}
echo "
";
echo "
";
$i ++;
}
} // END if( !empty($attachments) )
?>
Previous
Next
'. __('...read more', 'ascent-free') . '';
}
endif;
add_filter( 'excerpt_more', 'themeora_excerpt_more' );
if ( ! function_exists( 'themeora_get_link_url' ) ) :
/**
* Return the post URL.
*
* @uses get_url_in_content() to get the URL in the post meta (if it exists) or
* the first link found in the post content.
*
* Falls back to the post permalink if no URL is found in the post.
* @since Themeora 1.0
* @return string The Link format URL.
*/
function themeora_get_link_url() {
$content = get_the_content();
$has_url = get_url_in_content( $content );
return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
}
endif;
if ( ! function_exists( 'themeora_portfolio_prev_next' ) ) :
/**
* Show next / prev links on portfolio
*
* Falls back to the post permalink if no URL is found in the post.
* @since Themeora 1.0
* @param int post - the post id
*/
function themeora_portfolio_prev_next(){
$pagelist = get_pages('sort_column=menu_order&sort_order=asc&meta_key=_wp_page_template&meta_value=template-portfolio-item.php');
$pages = array();
foreach ( $pagelist as $page ) {
$pages[] += $page->ID;
}
$current = array_search(get_the_ID(), $pages);
$prevID = isset( $pages[$current-1] ) ? $pages[$current-1] : '' ;
$nextID = isset( $pages[$current+1] ) ? $pages[$current+1] : '' ;
?>
ID, 'download_category' );
if ($terms && ! is_wp_error($terms)) :
$term_slugs_arr = array();
foreach ($terms as $term) {
$term_link = get_term_link( $term );
$term_slugs_arr[] = '
'. $term->name .',';
}
$terms_slug_str = join( " ", $term_slugs_arr);
endif;
if ( isset( $terms_slug_str ) ) {
//echo '
' . rtrim( $terms_slug_str, ',' ) . '
';
}
endif;
// Load related posts
if ( post_type_exists('download') && isset( $term->slug ) ) : ?>