', '' ); ?>

'.esc_html__( 'Search Results for: ', 'allo' ).'%s', get_search_query() ); ?>

'_wp_page_template', 'meta_value' => $template_name ) ); if ( $template_array ) { $template_page_id = $template_array[0]->ID; } return $template_page_id; } } /** * Allo Author Name * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_author_name' ) ) : function allo_author_name() { global $current_user; $name = get_user_meta( get_current_user_id(), 'first_name', true )." ".get_user_meta( get_current_user_id(), 'last_name', true ); if (get_user_meta( get_current_user_id(), 'first_name', true )) { echo esc_html($name); } else { echo esc_html($current_user->display_name); } } endif; /** * Allo Template Part Functions * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_get_template_part' ) ) : function allo_get_template_part($part_name = "") { $part_style_url = (isset($_GET["{$part_name}_style"])) ? sanitize_text_field( wp_unslash( $_GET["{$part_name}_style"] ) ) : ''; $part_style = ($part_name == 'header') ? get_theme_mod('allo_header_variation') : ''; if($part_style_url) { $part_style = $part_style_url; } switch($part_style) { case 'one': case 'two': case 'three': case 'four': $part_style = $part_style; break; default: $part_style = "one"; break; } return get_template_part( "template-parts/$part_name/$part_style" ); } endif; /** * Allo Get Social Link * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_social_link' ) ) : function allo_social_link($social_link = "", $li_tag = false) { if ( $social_link != "" ) { if($li_tag != false ) echo '
  • '; foreach ( $social_link as $value ) { if ($value['icon']['type'] == "icon-font") { ?> <?php esc_attr_e('img icon','allo' ); ?> '; } } endif; /** * Allo Excerpt Length * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_excerpt_length' ) ) : function allo_excerpt_length($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`[[^]]*]`','',$excerpt); return $excerpt; } endif; /** * Allo String To Excerpt * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_string_to_excerpt' ) ) : function allo_string_to_excerpt($text = "", $limit = null) { $excerpt = explode(' ', $text, $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`[[^]]*]`','',$excerpt); return $excerpt; } endif; /** * /** * Include Conditional Tags, * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_custom_post_excerpt' ) ) : function allo_custom_post_excerpt($string, $length, $dots = "…") { return (strlen($string) > $length) ? substr($string, 0, $length - strlen($dots)) . $dots : $string; } endif; /** * Allo Custom Post Excerpt With Words * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_custom_string_limit_words' ) ) : function allo_custom_string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words); } endif; /** * Allo Custom Search * * @package Allo * @since 1.0 */ if ( ! function_exists( 'allo_custom_product_search' ) ) : function allo_custom_product_search() { ?>