';
if( $social_icon == 'googlePlus' ){
echo '';
}else{
echo '';
}
echo '';
}
}
}
}
/**
* Add a pingback url auto-discovery header for singularly identifiable articles.
*/
function agensy_pingback_header() {
if ( is_singular() && pings_open() ) {
echo '';
}
}
add_action( 'wp_head', 'agensy_pingback_header' );
/**
*to display post in custom
**/
function agensy_post_lists(){
$agensy_post_list =
array(
'post_type' => 'post',
'posts_per_page' => -1,
);
$posts_lists = array();
$posts_lists[''] = esc_html__('--Choose--','agensy');
$agensy_post = new WP_Query ($agensy_post_list);
while( $agensy_post->have_posts() ):
$agensy_post->the_post();
$posts_lists[ get_the_ID() ] = get_the_title();
endwhile;
return $posts_lists;
}
/**
*image display function
*
**/
function agensy_slider_control(){
?>
'0',
'exclude' => '1',
)
);
$agensy_services_cat_array = array();
$agensy_services_cat_array[''] = esc_html__('-- Choose --','agensy');
foreach($agensy_services_cat_lists as $agensy_services_cat_list){
$agensy_services_cat_array[$agensy_services_cat_list->slug] = $agensy_services_cat_list->name;
}
return $agensy_services_cat_array;
}
/**
*adding breadcrumbs in header
*
**/
function agensy_breadcrumbs() {
global $post;
$body_classes = get_body_class();
$showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show
$delimiter = '>';
$showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show
$homeLink = esc_url( home_url() );
if ( is_front_page()) {
if ($showOnHome == 1)
echo '' . esc_html__('Home', 'agensy') . ' ' . esc_attr($delimiter) . ' ';
if (is_category()) {
$thisCat = get_category(get_query_var('cat'), false);
if ($thisCat->parent != 0)
echo get_category_parents($thisCat->parent, TRUE, ' ' . esc_attr($delimiter) . ' ');
echo '
'. single_cat_title('', false).'';
}
if(is_home()) {
single_post_title();
}
elseif (is_search()) {
echo '
' . esc_html__('Search results for','agensy'). '"' . get_search_query() . '"' . '';
} elseif (is_day()) {
echo '
' . get_the_time('Y') . ' ' . esc_attr($delimiter) . ' ';
echo '
' . get_the_time('F') . ' ' . esc_attr($delimiter) . ' ';
echo '
' . get_the_time('d') . '';
} elseif (is_month()) {
echo '
' . get_the_time('Y') . ' ' . esc_attr($delimiter) . ' ';
echo '
' . get_the_time('F') . '';
} elseif (is_year()) {
echo '
' . get_the_time('Y') . '';
} elseif (is_single() && !is_attachment()) {
if (get_post_type() != 'post') {
if( get_post_type() == 'product' ){
$post_type = get_post_type_object(get_post_type());
$archiveLink = get_post_type_archive_link( 'product' );
$slug = $post_type->rewrite;
echo '
' . esc_attr($post_type->labels->singular_name) . '';
if ($showCurrent == 1)
echo ' ' . esc_attr($delimiter) . ' ' . '
' . get_the_title() . '';
}else{
$post_type = get_post_type_object(get_post_type());
$slug = $post_type->rewrite;
echo '
' . esc_attr($post_type->labels->singular_name) . '';
if ($showCurrent == 1)
echo ' ' . esc_attr($delimiter) . ' ' . '
' . get_the_title() . '';
}
} else {
$cat = get_the_category();
$cat = $cat[0];
$cats = get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
if ($showCurrent == 0)
$cats = preg_replace("#^(.+)\s$delimiter\s$#", "$1", $cats);
echo agensy_sanitize_bradcrumb($cats);
if ($showCurrent == 1)
echo '
' . get_the_title() . '';
}
} elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) {
$post_type = get_post_type_object(get_post_type());
echo '
' . esc_attr($post_type->labels->singular_name) . '';
} elseif (is_attachment()) {
if ($showCurrent == 1) echo ' ' . '
' . get_the_title() . '';
} elseif (is_page() && !$post->post_parent) {
if ($showCurrent == 1)
echo '
' . get_the_title() . '';
} elseif (is_page() && $post->post_parent) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '
' . get_the_title($page->ID) . '';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo agensy_sanitize_bradcrumb($breadcrumbs[$i]);
if ($i != count($breadcrumbs) - 1)
echo ' ' . esc_attr($delimiter). ' ';
}
if ($showCurrent == 1)
echo ' ' . esc_attr($delimiter) . ' ' . '
' . get_the_title() . '';
} elseif (is_tag()) {
echo '
' . esc_html__('Posts tagged','agensy').' "' . single_tag_title('', false) . '"' . '';
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo '
' . esc_html__('Articles posted by ','agensy'). esc_attr($userdata->display_name) . '';
} elseif (is_404()) {
echo '
' . 'Error 404' . '';
}
if (get_query_var('paged')) {
if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author())
echo ' (';
esc_html_e('Page', 'agensy') . ' ' . get_query_var('paged');
if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author())
echo ')';
}
echo '
';
}
}
/**
* display breadcrumbs
*
*/
function agensy_header_banner_x() {
if( get_header_image() ){
$overlay = '