>
', 'app-landing-page' ) ); // delimiter between crumbs $home = get_theme_mod( 'app_landing_page_breadcrumb_home_text', __( 'Home', 'app-landing-page' ) ); // text for the 'Home' link $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb $depth = 1; if( $ed_breadcrumb ){ echo '
' . esc_html( $home ) . '' . $delimiter . ''; if( is_home() && ! is_front_page() ){ $depth = 2; if( $showCurrent ) echo $before . '' . esc_html( single_post_title( '', false ) ) .''. $after; }elseif( is_category() ){ $depth = 2; $thisCat = get_category( get_query_var( 'cat' ), false ); if( $show_front === 'page' && $post_page ){ //If static blog post page is set $p = get_post( $post_page ); echo '' . esc_html( $p->post_title ) . '' . $delimiter . ''; $depth ++; } if ( $thisCat->parent != 0 ) { $parent_categories = get_category_parents( $thisCat->parent, false, ',' ); $parent_categories = explode( ',', $parent_categories ); foreach ( $parent_categories as $parent_term ) { $parent_obj = get_term_by( 'name', $parent_term, 'category' ); if( is_object( $parent_obj ) ){ $term_url = get_term_link( $parent_obj->term_id ); $term_name = $parent_obj->name; echo '' . esc_html( $term_name ) . '' . $delimiter . ''; $depth ++; } } } if( $showCurrent ) echo $before . '' . esc_html( single_cat_title( '', false ) ) . '' . $after; }elseif( is_tag() ){ $queried_object = get_queried_object(); $depth = 2; if( $showCurrent ) echo $before . '' . esc_html( single_tag_title( '', false ) ) .''. $after; }elseif( is_author() ){ $depth = 2; global $author; $userdata = get_userdata( $author ); if( $showCurrent ) echo $before . '' . esc_html( $userdata->display_name ) .''. $after; }elseif( is_day() ){ $depth = 2; echo '' . esc_html( get_the_time( __( 'Y', 'app-landing-page' ) ) ) . '' . $delimiter . ''; $depth ++; echo '' . esc_html( get_the_time( __( 'F', 'app-landing-page' ) ) ) . '' . $delimiter . ''; $depth ++; if( $showCurrent ) echo $before .''. esc_html( get_the_time( __( 'd', 'app-landing-page' ) ) ) .''. $after; }elseif( is_month() ){ $depth = 2; echo '' . esc_html( get_the_time( __( 'Y', 'app-landing-page' ) ) ) . '' . $delimiter . ''; $depth++; if( $showCurrent ) echo $before .''. esc_html( get_the_time( __( 'F', 'app-landing-page' ) ) ) .''. $after; }elseif( is_year() ){ $depth = 2; if( $showCurrent ) echo $before .''. esc_html( get_the_time( __( 'Y', 'app-landing-page' ) ) ) .''. $after; }elseif( is_single() && !is_attachment() ) { //For Woocommerce single product if( app_landing_page_is_woocommerce_activated() && 'product' === get_post_type() ){ if ( wc_get_page_id( 'shop' ) ) { //Displaying Shop link in woocommerce archive page $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; if ( ! $_name ) { $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->singular_name; } echo ' ' . esc_html( $_name) . ' ' . '' . $delimiter . ''; } if ( $terms = wc_get_product_terms( $post->ID, 'product_cat', array( 'orderby' => 'parent', 'order' => 'DESC' ) ) ) { $main_term = apply_filters( 'woocommerce_breadcrumb_main_term', $terms[0], $terms ); $ancestors = get_ancestors( $main_term->term_id, 'product_cat' ); $ancestors = array_reverse( $ancestors ); foreach ( $ancestors as $ancestor ) { $ancestor = get_term( $ancestor, 'product_cat' ); if ( ! is_wp_error( $ancestor ) && $ancestor ) { echo '' . esc_html( $ancestor->name ) . '' . $delimiter . ''; $depth++; } } echo '' . esc_html( $main_term->name ) . '' . $delimiter . ''; } if( $showCurrent ) echo $before .''. esc_html( get_the_title() ) .''. $after; }else{ //For Post $cat_object = get_the_category(); $potential_parent = 0; $depth = 2; if( $show_front === 'page' && $post_page ){ //If static blog post page is set $p = get_post( $post_page ); echo '' . esc_html( $p->post_title ) . '' . $delimiter . ''; $depth++; } if( is_array( $cat_object ) ){ //Getting category hierarchy if any //Now try to find the deepest term of those that we know of $use_term = key( $cat_object ); foreach( $cat_object as $key => $object ){ //Can't use the next($cat_object) trick since order is unknown if( $object->parent > 0 && ( $potential_parent === 0 || $object->parent === $potential_parent ) ){ $use_term = $key; $potential_parent = $object->term_id; } } $cat = $cat_object[$use_term]; $cats = get_category_parents( $cat, false, ',' ); $cats = explode( ',', $cats ); foreach ( $cats as $cat ) { $cat_obj = get_term_by( 'name', $cat, 'category' ); if( is_object( $cat_obj ) ){ $term_url = get_term_link( $cat_obj->term_id ); $term_name = $cat_obj->name; echo '' . esc_html( $term_name ) . '' . $delimiter . ''; $depth ++; } } } if ( $showCurrent ) echo $before .''. esc_html( get_the_title() ) .''. $after; } }elseif( is_page() ){ $depth = 2; if( $post->post_parent ){ global $post; $depth = 2; $parent_id = $post->post_parent; $breadcrumbs = array(); while( $parent_id ){ $current_page = get_post( $parent_id ); $breadcrumbs[] = $current_page->ID; $parent_id = $current_page->post_parent; } $breadcrumbs = array_reverse( $breadcrumbs ); for ( $i = 0; $i < count( $breadcrumbs); $i++ ){ echo '' . esc_html( get_the_title( $breadcrumbs[$i] ) ) . ''; if ( $i != count( $breadcrumbs ) - 1 ) echo ' ' . esc_html( $delimiter ) . ' '; $depth++; } if ( $showCurrent ) echo ' ' . esc_html( $delimiter ) . ' ' . $before .''. esc_html( get_the_title() ) .''. $after; }else{ if ( $showCurrent ) echo $before .''. esc_html( get_the_title() ) .''. $after; } }elseif( is_search() ){ $depth = 2; if( $showCurrent ) echo $before .''. esc_html__( 'Search Results for "', 'app-landing-page' ) . esc_html( get_search_query() ) . esc_html__( '"', 'app-landing-page' ) .''. $after; }elseif( app_landing_page_is_woocommerce_activated() && ( is_product_category() || is_product_tag() ) ){ //For Woocommerce archive page $depth = 2; if ( wc_get_page_id( 'shop' ) ) { //Displaying Shop link in woocommerce archive page $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; if ( ! $_name ) { $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->singular_name; } echo ' ' . esc_html( $_name) . ' ' . '' . $delimiter . ''; } $current_term = $GLOBALS['wp_query']->get_queried_object(); if( is_product_category() ){ $ancestors = get_ancestors( $current_term->term_id, 'product_cat' ); $ancestors = array_reverse( $ancestors ); foreach ( $ancestors as $ancestor ) { $ancestor = get_term( $ancestor, 'product_cat' ); if ( ! is_wp_error( $ancestor ) && $ancestor ) { echo '' . esc_html( $ancestor->name ) . '' . $delimiter . ''; $depth ++; } } } if( $showCurrent ) echo $before . '' . esc_html( $current_term->name ) .'' . $after; }elseif( app_landing_page_is_woocommerce_activated() && is_shop() ){ //Shop Archive page $depth = 2; if ( get_option( 'page_on_front' ) == wc_get_page_id( 'shop' ) ) { return; } $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; $shop_url = wc_get_page_id( 'shop' ) && wc_get_page_id( 'shop' ) > 0 ? get_the_permalink( wc_get_page_id( 'shop' ) ) : home_url( '/shop' ); if ( ! $_name ) { $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->singular_name; } if( $showCurrent ) echo $before . '' . esc_html( $_name ) .''. $after; }elseif( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) { $depth = 2; $post_type = get_post_type_object(get_post_type()); if( get_query_var('paged') ){ echo '' . esc_html( $post_type->label ) . ''; echo ' ' . $delimiter . ' ' . $before . sprintf( __('Page %s', 'app-landing-page'), get_query_var('paged') ) . $after; }elseif( is_archive() ){ echo $before .''. esc_html( $post_type->label ) .''. $after; }else{ echo $before .''. esc_html( $post_type->label ) .''. $after; } }elseif( is_attachment() ){ $depth = 2; $parent = get_post( $post->post_parent ); $cat = get_the_category( $parent->ID ); if( $cat ){ $cat = $cat[0]; echo get_category_parents( $cat, TRUE, ' ' . $delimiter . ' '); echo '' . esc_html( $parent->post_title ) . '' . ' ' . $delimiter . ''; } if( $showCurrent ) echo $before .''. esc_html( get_the_title() ) .''. $after; }elseif ( is_404() ){ if( $showCurrent ) echo $before . esc_html__( '404 Error - Page not Found', 'app-landing-page' ) . $after; } if( get_query_var('paged') ) echo __( ' (Page', 'app-landing-page' ) . ' ' . get_query_var('paged') . __( ')', 'app-landing-page' ); echo '
'; } } endif; add_action( 'app_landing_page_breadcrumbs', 'app_landing_page_breadcrumbs_cb' ); if( ! function_exists( 'app_landing_page_page_header' ) ) : /** * Page Header for inner pages * * @since 1.0.1 */ function app_landing_page_page_header(){ global $wp_query; if ( is_single() && get_theme_mod( 'app_landing_page_ed_breadcrumb' ) ){ echo '
'; do_action( 'app_landing_page_breadcrumbs' ); echo '
'; } if( ! is_single() ){ if( is_404() ) echo '
'; ?>
'; } } endif; add_action( 'app_landing_page_header_main', 'app_landing_page_page_header'); if( ! function_exists( 'app_landing_page_content_start' ) ) : /** * Content Start * * @since 1.0.1 */ function app_landing_page_content_start(){ $ed_section = app_landing_page_ed_section(); if( is_home() || ! $ed_section || ! ( is_front_page() || is_page_template( 'template-home.php' ) ) ) { echo '
'; if( is_404() ) { do_action( 'app_landing_page_header_main'); echo '
'; } echo '
'; if( ! is_404() ) { do_action( 'app_landing_page_header_main'); } echo '
'; } } endif; add_action( 'app_landing_page_before_content', 'app_landing_page_content_start', 20 ); if( ! function_exists( 'app_landing_page_page_content_image' ) ) : /** * Page Featured Image * * @since 1.0.1 */ function app_landing_page_page_content_image(){ $sidebar_layout = app_landing_page_sidebar_layout(); if( has_post_thumbnail() ) ( is_active_sidebar( 'right-sidebar' ) && ( $sidebar_layout == 'right-sidebar' ) ) ? the_post_thumbnail( 'app-landing-page-with-sidebar', array( 'itemprop' => 'image' ) ) : the_post_thumbnail( 'app-landing-page-without-sidebar', array( 'itemprop' => 'image' ) ); } endif; add_action( 'app_landing_page_before_page_entry_content', 'app_landing_page_page_content_image' ); if( ! function_exists( 'app_landing_page_post_content_image' ) ) : /** * Post Featured Image * * @since 1.0.1 */ function app_landing_page_post_content_image(){ if( has_post_thumbnail() ){ echo ( !is_single() ) ? '' : '
'; ( is_active_sidebar( 'right-sidebar' ) ) ? the_post_thumbnail( 'app-landing-page-with-sidebar', array( 'itemprop' => 'image' ) ) : the_post_thumbnail( 'app-landing-page-without-sidebar', array( 'itemprop' => 'image' ) ) ; echo ( !is_single() ) ? '' : '
' ; } } endif; add_action( 'app_landing_page_before_post_entry_content', 'app_landing_page_post_content_image', 10 ); add_action( 'app_landing_page_before_search_entry_summary', 'app_landing_page_post_content_image', 10 ); if( ! function_exists( 'app_landing_page_post_entry_header_before' ) ) : /** * Post Entry Header * * @since 1.0.1 */ function app_landing_page_post_entry_header_before(){ echo '
'; } endif; add_action( 'app_landing_page_before_post_entry_content', 'app_landing_page_post_entry_header_before', 20 ); add_action( 'app_landing_page_before_search_entry_summary', 'app_landing_page_post_entry_header_before', 20 ); if( ! function_exists( 'app_landing_page_post_entry_header' ) ) : /** * Post Entry Header * * @since 1.0.1 */ function app_landing_page_post_entry_header(){ ?>
', '' ); } else { the_title( '

', '

' ); } if ( 'post' === get_post_type() ) : echo ''; endif; ?>
'; } endif; add_action( 'app_landing_page_after_post_entry_content', 'app_landing_page_post_entry_header_after', 10 ); if( ! function_exists( 'app_landing_page_post_author' ) ) : /** * Post Author Bio * * @since 1.0.1 */ function app_landing_page_post_author(){ if( get_the_author_meta( 'description' ) ){ global $post; ?>

post_author ) ); ?> '; esc_html_e( 'Posted on ','app-landing-page' ); app_landing_page_author_posted_on(); echo ''; echo wpautop( wp_kses_post( get_the_author_meta( 'description' ) ) ); ?>
'; if( is_404() ){ echo '
'; } echo '
';// .row /#content /.container } } endif; add_action( 'app_landing_page_after_content', 'app_landing_page_content_end', 20 ); if( ! function_exists( 'app_landing_page_footer_start' ) ) : /** * Footer Start * * @since 1.0.1 */ function app_landing_page_footer_start(){ echo '
'; echo '
'; } endif; add_action( 'app_landing_page_footer', 'app_landing_page_footer_start', 20 ); if( ! function_exists( 'app_landing_page_footer_widgets' ) ) : /** * Footer Bottom * * @since 1.0.1 */ function app_landing_page_footer_widgets(){ if( is_active_sidebar( 'footer-sidebar-one') || is_active_sidebar( 'footer-sidebar-two') || is_active_sidebar( 'footer-sidebar-three') ){ echo '
'; echo '
'; if( is_active_sidebar( 'footer-sidebar-one') ) dynamic_sidebar( 'footer-sidebar-one' ); echo '
'; echo '
'; if( is_active_sidebar( 'footer-sidebar-two') ) dynamic_sidebar( 'footer-sidebar-two' ); echo '
'; echo '
'; if( is_active_sidebar( 'footer-sidebar-three') ) dynamic_sidebar( 'footer-sidebar-three' ); echo '
'; echo '
'; } } endif; add_action( 'app_landing_page_footer', 'app_landing_page_footer_widgets', 30 ); if( ! function_exists( 'app_landing_page_footer_credit' ) ) : /** * Footer Credits */ function app_landing_page_footer_credit(){ $copyright_text = get_theme_mod( 'app_landing_page_footer_copyright_text' ); echo '
© '; if( $copyright_text ){ echo wp_kses_post( $copyright_text ); }else{ echo date_i18n( esc_html__( 'Y', 'app-landing-page' ) ); echo '  ' . esc_html( get_bloginfo( 'name' ) ) . '. '; } esc_html_e( 'App Landing Page | Developed By ', 'app-landing-page' ); echo ''. esc_html__( 'Rara Theme', 'app-landing-page' ) . '. '; printf( esc_html__( 'Powered by %s', 'app-landing-page' ), ''. esc_html__( 'WordPress', 'app-landing-page' ) . '. ' ); if ( function_exists( 'the_privacy_policy_link' ) ) { the_privacy_policy_link(); } echo '
'; } endif; add_action( 'app_landing_page_footer', 'app_landing_page_footer_credit', 40 ); if( ! function_exists( 'app_landing_page_footer_end' ) ) : /** * Footer End * * @since 1.0.1 */ function app_landing_page_footer_end(){ echo '
'; echo '
'; echo '
'; // #colophon echo '
'; } endif; add_action( 'app_landing_page_footer', 'app_landing_page_footer_end', 50 ); if( ! function_exists( 'app_landing_page_page_end' ) ) : /** * Page End * * @since 1.0.1 */ function app_landing_page_page_end(){ ?>