max_num_pages; if (!$current = get_query_var('paged')) $current = 1; $args['base'] = str_replace($big, '%#%', esc_url( get_pagenum_link( $big ) ) ); $args['total'] = $max; $args['current'] = $current; $args['add_args'] = false; $total = 1; $args['mid_size'] = 3; $args['end_size'] = 1; $args['prev_text'] = ''; $args['next_text'] = ''; if ($max > 1) echo '
'; if ($total == 1 && $max > 1) { echo paginate_links($args); } if ($max > 1) echo '
'; } /** * Schema type */ function ascend_html_tag_schema() { $schema = 'http://schema.org/'; if( is_singular( 'post' ) ) { $type = "WebPage"; } elseif( is_author() ) { $type = 'ProfilePage'; } elseif( is_search() ) { $type = 'SearchResultsPage'; } else { $type = 'WebPage'; } echo apply_filters('kadence_html_schema', 'itemscope="itemscope" itemtype="' . esc_attr( $schema ) . esc_attr( $type ) . '"' ); } // Custom Excerpt by length function ascend_excerpt($limit) { // get Read more text $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt); $excerpt = str_replace($readmore,'><',$excerpt); return $excerpt; } // Custom content by length function ascend_content($limit) { $content = explode(' ', get_the_content(), $limit); if (count($content)>=$limit) { array_pop($content); $content = implode(" ",$content).'...'; } else { $content = implode(" ",$content); } return $content; }