Example #1
0
 public static function breadcrumbs()
 {
     global $post;
     if (is_front_page()) {
         echo '<!--breadcrumbs--><nav role="navigation" class="breadcrumbs">';
         echo '<ul>';
         echo '<li>' . __('Home', 'socialchef') . '</li>';
         echo '</ul>';
         echo '</nav>';
     } elseif (is_home()) {
         echo '<!--breadcrumbs--><nav role="navigation" class="breadcrumbs">';
         echo '<ul>';
         echo '<li><a href="' . esc_url(home_url()) . '" title="' . __('Home', 'socialchef') . '">' . __('Home', 'socialchef') . '</a></li>';
         echo "<li>";
         echo __('Blog', 'socialchef');
         echo "</li>";
         echo "</ul>";
         echo '</nav>';
     } else {
         if (defined('BP_VERSION') && (bp_current_component() == 'members' || bp_current_component() == 'groups' || bp_current_component() == 'activity' || bp_current_component() == 'profile' || bp_current_component() == 'settings' || bp_current_component() == 'notifications' || bp_current_component() == 'friends' || bp_current_component() == 'messages' || bp_current_component() == 'forums' || bp_is_register_page())) {
             global $bp;
             $members_root = home_url() . '/' . $bp->members->root_slug;
             // slug for the Members page. The BuddyPress default is 'members'.
             $activity_root = home_url() . '/' . $bp->activity->root_slug;
             // slug for the Activity page. The BuddyPress default is 'activity'.
             //$forums_root = $bp->forums->root_slug; // slug for the Forums page. The BuddyPress default is 'forums'.
             echo '<!--breadcrumbs--><nav role="navigation" class="breadcrumbs">';
             echo '<ul>';
             echo '<li><a href="' . esc_url(home_url()) . '" title="' . __('Home', 'socialchef') . '">' . __('Home', 'socialchef') . '</a></li>';
             if (bp_is_directory()) {
                 if (bp_current_component() == 'groups') {
                     $groups_title = bp_get_directory_title('groups');
                     $groups_root = home_url() . '/' . $bp->groups->root_slug;
                     // slug for the Groups page. The BuddyPress default is 'groups'.
                     echo '<li><a href="' . esc_url($groups_root) . '">' . $groups_title . '</a></li>';
                 } else {
                     echo '<li>';
                     echo get_the_title();
                     echo '</li>';
                 }
             } else {
                 if ($bp->displayed_user->userdata && (bp_current_component() == 'profile' || bp_current_component() == 'messages' || bp_current_component() == 'activity' || bp_current_component() == 'notifications' || bp_current_component() == 'settings' || bp_current_component() == 'friends' || bp_current_component() == 'forums' || bp_current_component() == 'my-recipes' || bp_current_component() == 'groups')) {
                     $user_name = ucwords($bp->displayed_user->fullname);
                     // echo '<li><a href="' . esc_url( $members_root ) . '">' . get_the_title() . '</a></li>';
                     echo '<li><a href="' . esc_url($bp->displayed_user->domain) . '" title="' . $user_name . '">' . $user_name . '</a></li>';
                     echo '<li>' . ucwords($bp->current_component) . '</li>';
                 } else {
                     if (bp_is_register_page()) {
                         echo '<li>' . __('Register an account', 'socialchef') . '</li>';
                     } else {
                         if (bp_current_component() == 'groups') {
                             $groups_root = home_url() . '/' . $bp->groups->root_slug;
                             // slug for the Groups page. The BuddyPress default is 'groups'.
                             if (isset($bp->groups->current_group->name)) {
                                 echo '<li><a href="' . esc_url($groups_root) . '">';
                                 echo $bp->groups->current_group->name;
                                 echo '</a></li>';
                             } else {
                                 echo '<li><a href="' . esc_url($groups_root) . '">';
                                 echo $bp->groups->name;
                                 echo '</a></li>';
                             }
                             if (bp_current_action() == 'create') {
                                 echo '<li>' . __('Create', 'socialchef') . '</li>';
                             }
                         }
                     }
                 }
             }
             echo '</ul>';
             echo '</nav><!--//breadcrumbs-->';
         } else {
             if (class_exists('bbPress') && is_bbpress()) {
                 if (function_exists('bbp_breadcrumb')) {
                     $bbpress_bc_args = array('before' => '<nav role="navigation" class="breadcrumbs"><ul>', 'after' => '</ul></nav>', 'sep' => ' ', 'pad_sep' => 0, 'sep_before' => '', 'sep_after' => '', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'current_before' => '', 'current_after' => '');
                     global $sc_theme_filters;
                     $sc_theme_filters->disable_bbp_no_breadcrumb_filter();
                     bbp_breadcrumb($bbpress_bc_args);
                     $sc_theme_filters->enable_bbp_no_breadcrumb_filter();
                 }
             } else {
                 echo '<!--breadcrumbs--><nav role="navigation" class="breadcrumbs">';
                 echo '<ul>';
                 echo '<li><a href="' . esc_url(home_url()) . '" title="' . __('Home', 'socialchef') . '">' . __('Home', 'socialchef') . '</a></li>';
                 if (is_category()) {
                     echo "<li>";
                     the_category('</li><li>');
                     echo "</li>";
                 } elseif (is_page() || is_single()) {
                     echo "<li>";
                     echo the_title();
                     echo "</li>";
                 } elseif (is_404()) {
                     echo "<li>" . __('Error 404 - Page not found', 'socialchef') . "</li>";
                 } elseif (is_search()) {
                     echo "<li>";
                     echo __('Search results for: ', 'socialchef');
                     echo '"<em>';
                     echo get_search_query();
                     echo '</em>"';
                     echo "</li>";
                 } else {
                     if (is_post_type_archive('recipe')) {
                         echo "<li>";
                         echo __('Recipes', 'socialchef');
                         echo "</li>";
                     }
                 }
                 echo '</ul>';
                 echo '</nav><!--//breadcrumbs-->';
             }
         }
     }
 }
			<?php 
    if (rd_options('reedwan_show_breadcrumb') == 1) {
        ?>
			<div class="breadcrumbIn">
				<?php 
        if (is_search() || is_page() || is_singular() && !is_woocommerce() && !is_bbpress() || is_archive() && !is_woocommerce() && !is_bbpress()) {
            breadcrumb();
        }
        if (class_exists('Woocommerce')) {
            if (is_woocommerce()) {
                woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumb">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => ''));
            }
        }
        if (class_exists('bbPress')) {
            if (is_bbpress()) {
                bbp_breadcrumb(array('before' => '<ul class="breadcrumb">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'corporative')));
            }
        }
        ?>
 
			</div>
			<?php 
    }
    ?>
		</div>
		<?php 
    if (is_singular('post') && rd_options('reedwan_post_nav') == 1 || is_singular('product') && rd_options('reedwan_post_nav') == 1 || is_singular('portfolio') && rd_options('reedwan_portfolio_nav') == 1) {
        ?>
		<div class="single-navs">
			<div class="nav-prev">
				<?php 
Example #3
0
	<?php endif; ?>
	<?php endif; // end class check if for woocommerce ?>
	<?php
	if( class_exists('bbPress')):
	if(is_bbpress()): ?>
	<div class="page-title-container">
		<div class="page-title">
			<div class="page-title-wrapper">
			<div class="page-title-captions">
			<?php if(get_post_meta($c_pageID, 'pyre_page_title_text', true) != 'no'): ?>
			<h1 class="entry-title"><?php the_title(); ?></h1>
			<?php endif; ?>
			</div>
			<?php if($data['breadcrumb']): ?>
			<?php if($data['page_title_bar_bs'] == 'Breadcrumbs'): ?>
			<?php bbp_breadcrumb( array ( 'before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada')) ); ?>
			<?php else: ?>
			<?php get_search_form(); ?>
			<?php endif; ?>
			<?php endif; ?>
			</div>
		</div>
	</div>
	<?php endif; ?>
	<?php endif; ?>
	<?php endif; ?>
	<?php if(is_page_template('contact.php') && $data['recaptcha_public'] && $data['recaptcha_private']): ?>
	<script type="text/javascript">
	 var RecaptchaOptions = {
	    theme : '<?php echo $data['recaptcha_color_scheme']; ?>'
	 };
Example #4
0
function avada_current_page_title_bar($post_id)
{
    global $smof_data;
    ob_start();
    if ($smof_data['breadcrumb']) {
        if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') {
            if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) {
                woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => ''));
            } else {
                if (class_exists('bbPress') && is_bbpress()) {
                    bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada')));
                } else {
                    themefusion_breadcrumb();
                }
            }
        } else {
            get_search_form();
        }
    }
    $secondary_content = ob_get_contents();
    ob_get_clean();
    $title = '';
    $subtitle = '';
    if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
        $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
    }
    if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
        $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
    }
    if (!$title) {
        $title = get_the_title();
        if (is_home()) {
            $title = $smof_data['blog_title'];
        }
        if (is_search()) {
            $title = __('Rezultati pretrage za:', 'Avada') . get_search_query();
        }
        if (is_404()) {
            $title = __('Error 404 Page', 'Avada');
        }
        if (class_exists('TribeEvents') && tribe_is_event() && !is_single() || class_exists('TribeEvents') && is_events_archive() && is_404()) {
            $title = tribe_get_events_title();
        }
        if (is_archive() && !is_bbpress()) {
            if (is_day()) {
                $title = __('Dnevna arhiva:', 'Avada') . '<span> ' . get_the_date() . '</span>';
            } else {
                if (is_month()) {
                    $title = __('Mjesečna arhiva:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
                } elseif (is_year()) {
                    $title = __('Godišnja arhiva:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
                } elseif (is_author()) {
                    $curauth = get_user_by('id', get_query_var('author'));
                    $title = $curauth->nickname;
                } else {
                    $title = single_cat_title('', false);
                }
            }
        }
        if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
            if (!is_product()) {
                $title = woocommerce_page_title(false);
            }
        }
    }
    if (!$subtitle) {
        if (is_home()) {
            $subtitle = $smof_data['blog_subtitle'];
        }
    }
    if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
        if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) != 'no') {
            if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') {
                $title = '';
                $subtitle = '';
            }
            if (is_home() && is_front_page() && !$smof_data['blog_show_page_title_bar']) {
                // do nothing
            } else {
                avada_page_title_bar($title, $subtitle, $secondary_content);
            }
        }
    } else {
        if (is_home() && !$smof_data['blog_show_page_title_bar']) {
            // do nothing
        } else {
            if ($smof_data['page_title_bar']) {
                avada_page_title_bar($title, $subtitle, $secondary_content);
            }
        }
    }
}
					<?php 
} else {
    ?>
					<h1 class="site-title"><a class="site-anchor" href="<?php 
    echo home_url('/');
    ?>
"><?php 
    bloginfo('name');
    ?>
</a></h1>
					<?php 
}
// End header image check.
?>

				</div>
				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse navbar-ex1-collapse">
					<?php 
wp_nav_menu(array('menu' => 'primary', 'theme_location' => 'primary', 'depth' => 2, 'container' => '', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()));
?>
				</div>
			</div>
		</nav>
	</header><!-- #masthead -->

	<div id="content" class="site-content container">

	<?php 
bbp_breadcrumb(array('before' => '<ol id="breadcrumbs" class="breadcrumb">', 'after' => '</ol>', 'sep' => ' ', 'pad_sep' => 0, 'sep_before' => '', 'sep_after' => '', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'current_before' => '<span class="text-muted">', 'current_after' => '</span>'));
Example #6
0
} else {
    $component = false;
}
$bbpress = false;
if (is_plugin_active('bbpress/bbpress.php')) {
    $bbpress = is_bbpress();
}
if ($component or $bbpress) {
    ?>
<div class="title_wrapper container">
	<div class="col-lg-12"><h1><?php 
    the_title();
    ?>
</h1></div>
	<div class="col-lg-12 breadcrumbs"><strong><?php 
    echo bbp_breadcrumb();
    ?>
</strong></div>
</div>
<?php 
} elseif (is_singular('clan') or is_front_page() or is_page_template('tmp-home.php') or is_page_template('tmp-no-title.php') or is_page_template('tmp-home-left.php') or is_page_template('tmp-home-right.php') or is_page_template('tmp-home-news.php')) {
} elseif (is_search()) {
    ?>
<div class="title_wrapper container">

            <div class="col-lg-12"><h1><?php 
    esc_html_e('Search Result for ', 'crystalskull');
    echo get_search_query();
    ?>
</h1></div>
            <div class="col-lg-12 breadcrumbs"><strong><?php 
function quest_breadcrumb()
{
    global $post;
    if (function_exists('is_woocommerce') && is_woocommerce()) {
        woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'delimiter' => '', 'before' => '<li>', 'after' => '</li>'));
        return;
    }
    if (function_exists('is_bbpress') && is_bbpress()) {
        echo '<ul class="breadcrumbs">';
        bbp_breadcrumb(array('delimiter' => '', 'before' => '<li>', 'after' => '</li>'));
        echo '</ul>';
        return;
    }
    echo '<ul class="breadcrumbs">';
    if (!is_front_page()) {
        echo '<li><a href="';
        echo home_url();
        echo '">' . __('Home', 'quest');
        echo "</a></li>";
    }
    if (is_category() || is_single() && !is_singular('portfolio')) {
        $category = get_the_category();
        if (isset($category[0])) {
            $ID = $category[0]->cat_ID;
            echo '<li>' . get_category_parents($ID, true, '', false) . '</li>';
        }
    }
    if (is_singular('portfolio')) {
        echo get_the_term_list($post->ID, 'portfolio_category', '<li>', ' - ', '</li>');
    }
    if (is_home()) {
        echo '<li>' . get_option('blog_title', 'Blog') . '</li>';
    }
    if (is_single() || is_page()) {
        //this is the only part modified from this function
        $breadcrumb = array();
        // Get current page
        $current = $post;
        // Check if current post has ancestors
        if ($current->ancestors) {
            $ancestors = array_reverse($current->ancestors);
            // Step through ancestors array to build breadcrumb
            if (count($ancestors) > 0) {
                foreach ($ancestors as $i => $text) {
                    $breadcrumb[$i] = '<li><a href="' . get_page_link($text) . '" title="' . esc_attr(apply_filters('the_title', get_the_title($text))) . '">' . get_the_title($text) . '</a></li>';
                }
            }
        }
        // Insert a link to the current page
        $breadcrumb[] = '<li><a href="' . get_page_link($current->ID) . '" title="' . esc_attr(apply_filters('the_title', $current->post_title)) . '">' . get_the_title($current) . '</a></li>';
        // Display breacrumb with demarcator
        echo implode('', $breadcrumb);
    }
    if (is_tag()) {
        echo '<li>' . "Tag: " . single_tag_title('', false) . '</li>';
    }
    if (is_404()) {
        echo '<li>' . __("404 - Page not Found", 'quest') . '</li>';
    }
    if (is_search()) {
        echo '<li>' . __("Search", 'quest') . '</li>';
    }
    if (is_year()) {
        echo '<li>' . get_the_time('Y') . '</li>';
    }
    echo "</ul>";
}
Example #8
0
function crystalskull_breadcrumbs()
{
    if (function_exists('is_bbpress')) {
        if (is_bbpress()) {
            bbp_breadcrumb();
        } else {
            crystalskull_breadcrumbs_inner();
        }
    } else {
        crystalskull_breadcrumbs_inner();
    }
}
/**
 * Our template part:
 *    Widgetized content area, when there are no bbPress Forum search results.
 *
 * @since 1.5.0
 *
 * @uses  bbp_breadcrumb() 	Original bbPress breadcrumb functionality.
 * @uses  do_action() 		Original bbPress action hooks.
 * @uses  dynamic_sidebar()
 */
function ddw_gwnf_bbpress_widgetized_noresults_content()
{
    /** Let bbPress take over its own Breadcrumbs */
    echo '<div id="bbpress-forums">';
    bbp_breadcrumb();
    echo '</div>';
    /** Add bbPress own "before" action hook */
    do_action('bbp_template_before_search');
    /** Here is where the magic happens - our widgetized area gets displayed */
    echo '<div id="gwnf-bbpress-widgetized-content" class="gwnf-bbpress-notfound-area entry-content">';
    dynamic_sidebar('gwnf-bbpress-notfound-area');
    echo '</div><!-- end #content .gwnf-bbpress-notfound-area .entry-content -->';
    /** Add bbPress own "after" action hook */
    do_action('bbp_template_after_search_results');
}
Example #10
0
 /**
  * Prints breadcrumb HTML required by the theme
  */
 function quest_breadcrumb()
 {
     global $post;
     if (function_exists('is_woocommerce') && is_woocommerce()) {
         woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'delimiter' => '', 'before' => '<li>', 'after' => '</li>'));
         return;
     }
     if (function_exists('is_bbpress') && is_bbpress()) {
         echo '<ul class="breadcrumbs">';
         bbp_breadcrumb(array('delimiter' => '', 'before' => '<li>', 'after' => '</li>'));
         echo '</ul>';
         return;
     }
     echo '<ul class="breadcrumbs">';
     if (!is_front_page()) {
         echo '<li><a href="';
         echo home_url();
         echo '">' . __('Home', 'quest');
         echo "</a></li>";
     }
     if (is_category() || is_single() && !is_singular('portfolio')) {
         $category = get_the_category();
         if (isset($category[0])) {
             $ID = $category[0]->cat_ID;
             echo '<li>' . get_category_parents($ID, true, '', false) . '</li>';
         }
     }
     if (is_singular('portfolio')) {
         echo get_the_term_list($post->ID, 'portfolio_category', '<li>', ' - ', '</li>');
     }
     if (is_home()) {
         echo '<li>' . get_option('blog_title', 'Blog') . '</li>';
     }
     if (is_single() || is_page()) {
         echo '<li>' . get_the_title() . '</li>';
     }
     if (is_tag()) {
         echo '<li>' . "Tag: " . single_tag_title('', false) . '</li>';
     }
     if (is_404()) {
         echo '<li>' . __("404 - Page not Found", 'quest') . '</li>';
     }
     if (is_search()) {
         echo '<li>' . __("Search", 'quest') . '</li>';
     }
     if (is_year()) {
         echo '<li>' . get_the_time('Y') . '</li>';
     }
     echo "</ul>";
 }
Example #11
0
function orizon_breadcrumbs()
{
    if (function_exists('is_bbpress')) {
        if (is_bbpress()) {
            bbp_breadcrumb();
        } else {
            //      orizon_breadcrumbs_inner();}
            catreina_breadcrumbs();
        }
    } else {
        //    orizon_breadcrumbs_inner();
        catreina_breadcrumbs();
    }
}
Example #12
0
 public function breadcrumbs()
 {
     global $super_options, $ioa_portfolio_slug;
     $delimiter = $super_options[SN . "_breadcrumb_delimiter"];
     $portfolio_parent_link = $super_options[SN . '_portfolio_parent_link'];
     $blog_parent_link = $super_options[SN . '_blog_parent_link'];
     $blog_label = $super_options[SN . '_blog_label'];
     $portfolio_label = $super_options[SN . '_portfolio_blabel'];
     $name = $super_options[SN . "_breadcrumb_home_label"];
     // text for the 'Home' link
     $currentBefore = ' <span class="current">';
     $currentAfter = '</span> ';
     $type = get_post_type();
     if (IOA_WOO_EXISTS && is_woocommerce()) {
         echo '<div id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">';
         woocommerce_breadcrumb();
         echo '</div>';
     } else {
         if (function_exists('is_bbpress') && is_bbpress()) {
             echo '<div id="breadcrumbs" class="clearfix"  itemscope itemtype="http://data-vocabulary.org/Breadcrumb">';
             bbp_breadcrumb();
             echo '</div>';
         } elseif (!is_home() && !is_front_page() && get_post_type() == $type || is_paged()) {
             echo '<div id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">';
             global $post;
             $home = home_url('/');
             echo '<a href="' . $home . '"  itemprop="url"><span itemprop="title">' . $name . '</span></a> ' . $delimiter . ' ';
             if (is_category()) {
                 global $wp_query;
                 $cat_obj = $wp_query->get_queried_object();
                 $thisCat = $cat_obj->term_id;
                 $thisCat = get_category($thisCat);
                 $parentCat = get_category($thisCat->parent);
                 if ($thisCat->parent != 0) {
                     echo get_category_parents($parentCat, true, '' . $delimiter . '');
                 }
                 echo $currentBefore . single_cat_title() . $currentAfter;
             } else {
                 if (is_tax()) {
                     echo $currentBefore . single_term_title() . $currentAfter;
                 } else {
                     if (is_day()) {
                         echo '<a href="' . get_year_link(get_the_time('Y')) . '"  itemprop="url"><span itemprop="title">' . get_the_time('Y') . '</span></a> ' . $delimiter . '';
                         echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '"  itemprop="url"><span itemprop="title">' . get_the_time('F') . '</span></a> ' . $delimiter . ' ';
                         echo $currentBefore . get_the_time('d') . $currentAfter;
                     } else {
                         if (is_month()) {
                             echo '<a href="' . get_year_link(get_the_time('Y')) . '"  itemprop="url"><span itemprop="title">' . get_the_time('Y') . '</span></a> ' . $delimiter . '';
                             echo $currentBefore . get_the_time('F') . $currentAfter;
                         } else {
                             if (is_year()) {
                                 echo $currentBefore . get_the_time('Y') . $currentAfter;
                             } else {
                                 if (is_attachment()) {
                                     echo $currentBefore;
                                     the_title();
                                     $currentAfter;
                                 }
                             }
                         }
                     }
                 }
             }
             if (is_single()) {
                 $cat = null;
                 if ($post->post_type == "post") {
                     if (trim($blog_parent_link) != "") {
                         echo "<a href='" . $blog_parent_link . "'  itemprop='url'><span itemprop=\"title\">" . $blog_label . "</span></a> " . $delimiter . ' ';
                     } else {
                         $cat = get_the_category();
                         $cat = $cat[0];
                         if ($cat !== NULL) {
                             echo get_category_parents($cat, true, ' ' . $delimiter . '');
                         }
                     }
                 } else {
                     if ($post->post_type == $ioa_portfolio_slug && $portfolio_parent_link != "") {
                         echo "<a href='" . $portfolio_parent_link . "'  itemprop='url'><span itemprop=\"title\">" . $portfolio_label . "</span></a> " . $delimiter . ' ';
                     } else {
                         $taxonomies = get_object_taxonomies($post, 'names');
                         if (count($taxonomies) > 0) {
                             $cats = get_the_terms($post->ID, $taxonomies[0]);
                             $cat = false;
                             $i = 0;
                             if ($cats) {
                                 foreach ($cats as $c) {
                                     if ($i == 0) {
                                         $cat = $c;
                                         $i++;
                                     } else {
                                         break;
                                     }
                                 }
                             }
                         }
                     }
                 }
                 echo $currentBefore;
                 the_title();
                 echo $currentAfter;
             } else {
                 if (is_page() && !$post->post_parent) {
                     echo $currentBefore;
                     the_title();
                     echo $currentAfter;
                 } else {
                     if (is_page() && $post->post_parent) {
                         $parent_id = $post->post_parent;
                         $breadcrumbs = array();
                         while ($parent_id) {
                             $page = get_page($parent_id);
                             $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '"  itemprop="url"><span itemprop="title">' . get_the_title($page->ID) . '</span></a>';
                             $parent_id = $page->post_parent;
                         }
                         $breadcrumbs = array_reverse($breadcrumbs);
                         foreach ($breadcrumbs as $crumb) {
                             echo $crumb . ' ' . $delimiter . ' ';
                         }
                         echo $currentBefore;
                         the_title();
                         echo $currentAfter;
                     } else {
                         if (is_search()) {
                             echo $currentBefore . __('Search Results For:', 'ioa') . ' ' . get_search_query() . $currentAfter;
                         } else {
                             if (is_tag()) {
                                 echo $currentBefore . single_tag_title() . $currentAfter;
                             } else {
                                 if (is_author()) {
                                     global $author;
                                     $userdata = get_userdata($author);
                                     echo $currentBefore . $userdata->display_name . $currentAfter;
                                 } else {
                                     if (is_404()) {
                                         echo $currentBefore . __('404 Not Found', 'ioa') . $currentAfter;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
             if (get_query_var('paged')) {
                 if (is_home() || is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
                     echo $currentBefore;
                 }
                 echo __('Page', 'ioa') . ' ' . get_query_var('paged');
                 if (is_home() || is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
                     echo $currentAfter;
                 }
             }
             echo '</div>';
         }
     }
 }
 function catreina_breadcrumbs()
 {
     // NOTE : We do not support nor display breadcrumbs on single
     // post pages because of our permalink structure (/%postname%/)
     if (function_exists('yoast_breadcrumb')) {
         yoast_breadcrumb('', '');
     } elseif (function_exists('is_bbpress') && is_bbpress()) {
         bbp_breadcrumb();
     } else {
         // Set up the "home" link
         $name = get_bloginfo();
         echo '<span><a href="' . home_url() . '">' . $name . '</a> //&nbsp;</span>';
         if (is_home()) {
             // Blog posts index page
             echo "Blog";
         } elseif (is_single() && get_post_type(get_the_ID()) == 'portfolio') {
             // if this is portfolio display
             if (!of_get_option('portfolio_breadcrumbs')) {
                 $breadcrumb = "Portfolio";
             } else {
                 $breadcrumb = of_get_option('portfolio_breadcrumbs');
             }
             echo $breadcrumb;
         } elseif (is_page()) {
             // Static Page
             echo the_title();
         } elseif (is_404()) {
             // 404 error page
             echo '404';
         } elseif (is_search()) {
             // Search page / Search Results page
             echo "Search";
         } elseif (is_category()) {
             // displaying a category archive / page
             printf('Category Archives: %s', '<span>' . single_cat_title('', false) . '</span>');
         } elseif (is_tag()) {
             // displaying a tag archive
             printf('Tag Archives: %s', '<span>' . single_tag_title('', false) . '</span>');
         } elseif (is_day()) {
             // displaying a daily archive
             printf('Daily Archives: %s', '<span>' . get_the_date() . '</span>');
         } elseif (is_month()) {
             // displaying a monthly archive
             printf('Monthly Archives: %s', '<span>' . get_the_date('F Y') . '</span>');
         } elseif (is_year()) {
             // displaying a yearly archive
             printf('Yearly Archives: %s', '<span>' . get_the_date('Y') . '</span>');
         } else {
             // displaying some other archive
             _e('Archives', 'catreina');
         }
     }
 }
Example #14
0
 function ktz_crumbs()
 {
     global $post;
     if (is_front_page()) {
         return;
     }
     if (class_exists('bbPress') && is_bbpress()) {
         bbp_breadcrumb();
     } else {
         if (ot_get_option('ktz_breadcrumbs') == 'yes') {
             echo '<div class="breadcrumb-wrap" xmlns:v="http://rdf.data-vocabulary.org/#"><ol class="breadcrumb btn-box">';
             echo '<li><span typeof="v:Breadcrumb"><a href="';
             echo home_url();
             echo '" rel="v:url" property="v:title">';
             echo __('Home', ktz_theme_textdomain);
             echo "</a></span></li>";
             if (is_category()) {
                 global $wp_query;
                 $cat_obj = $wp_query->get_queried_object();
                 $thisCat = $cat_obj->term_id;
                 $thisCat = get_category($thisCat);
                 $parentCat = get_category($thisCat->parent);
                 if ($thisCat->parent != 0) {
                     echo '<li><span typeof="v:Breadcrumb"><a href="';
                     echo get_category_link($parentCat->term_id);
                     echo '" rel="v:url" property="v:title">';
                     echo $parentCat->name;
                     echo "</a></span></li>";
                 }
                 echo '<li><span property="v:title">';
                 echo sprintf(__('Archive by category "%s"', ktz_theme_textdomain), single_cat_title('', false));
                 echo '</span></li>';
             } elseif (is_post_type_archive()) {
                 echo '<li><span property="v:title">';
                 echo post_type_archive_title();
                 echo '</span></li>';
             } elseif (is_single()) {
                 $category = get_the_category();
                 foreach ($category as $category) {
                     echo '<li><span typeof="v:Breadcrumb"><a href="';
                     echo get_category_link($category->term_id);
                     echo '" rel="v:url" property="v:title">' . $category->name . '</a></span></li>';
                 }
                 echo '<li><span property="v:title">' . get_the_title() . '</span></li>';
             } elseif (is_page()) {
                 echo '<li><span property="v:title">' . get_the_title() . '</span></li>';
             } elseif (is_tag()) {
                 echo '<li><span property="v:title">';
                 echo single_tag_title();
                 echo '</span></li>';
             } elseif (is_day()) {
                 echo '<li><span property="v:title">' . __("Archive for ", ktz_theme_textdomain);
                 get_the_time('F jS, Y') . '</span></li>';
             } elseif (is_month()) {
                 echo '<li><span property="v:title">' . __("Archive for ", ktz_theme_textdomain);
                 get_the_time('F, Y') . '</span></li>';
             } elseif (is_year()) {
                 echo '<li><span property="v:title">' . __("Archive for ", ktz_theme_textdomain);
                 get_the_time('Y') . '</span></li>';
             } elseif (is_author()) {
                 echo '<li><span property="v:title">' . __("Author Archive", ktz_theme_textdomain) . '</span></li>';
             } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
                 echo '<li><span property="v:title">' . __("Blog Archives", ktz_theme_textdomain) . '</span></li>';
             } elseif (is_search()) {
                 echo '<li><span property="v:title">' . get_search_query() . '</span></li>';
             } elseif (is_404()) {
                 echo '<li><span property="v:title">' . __("Page not found", ktz_theme_textdomain) . '</span></li>';
             }
             echo '</ol></div>';
         }
     }
 }
Example #15
0
<?php

/**
 * New/Edit Reply
 *
 * @package bbPress
 * @subpackage Theme
 */

?>

<?php if ( bbp_is_reply_edit() ) : ?>

<div id="bbpress-forums">

	<?php bbp_breadcrumb(); ?>

<?php endif; ?>

<?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>

	<div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form">

		<form id="new-post" name="new-post" method="post" action="<?php the_permalink(); ?>">

			<?php do_action( 'bbp_theme_before_reply_form' ); ?>

			<fieldset class="bbp-form">
				<legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend>

				<?php do_action( 'bbp_theme_before_reply_form_notices' ); ?>
Example #16
0
">

<?php 
if (have_posts()) {
    ?>

		<?php 
    while (have_posts()) {
        the_post();
        ?>

				<article>

					<?php 
        $nice_breadcrumbs_args = array('before' => '<div class="breadcrumb breadcrumbs nice-breadcrumb"><div class="breadcrumb-trail">', 'after' => '</div></div>', 'sep' => '<span class="sep">/</span>');
        bbp_breadcrumb($nice_breadcrumbs_args);
        ?>

					<div class="entry clearfix">

						<?php 
        the_content(__('Continue reading', 'nicethemes') . ' &raquo;');
        ?>

						<?php 
        wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'nicethemes'), 'after' => '</div>'));
        ?>
					</div>

				</article>
Example #17
0
 /**
  * Display a breadcrumb
  *
  * @since bbPress (r3302)
  *
  * @return string
  */
 public function display_breadcrumb()
 {
     // Unset globals
     $this->unset_globals();
     // Start output buffer
     $this->start();
     // Output breadcrumb
     bbp_breadcrumb();
     // Return contents of output buffer
     return $this->end();
 }
<?php 
}
?>
</div>
</div>
<!-- /#page-header -->

<?php 
if (!get_post_meta($post->ID, '_st_page_breadcrumbs', true)) {
    ?>
<!-- #breadcrumbs -->
<div id="page-subnav" class="clearfix">
<div class="container">
<?php 
    $st_bbpress_breadcrumbs_args = array('before' => '<nav class="bbp-breadcrumb">', 'after' => '</nav>', 'sep' => __('&frasl;', 'bbpress'));
    bbp_breadcrumb($st_bbpress_breadcrumbs_args);
    ?>
</div>
</div>
<!-- /#breadcrumbs -->
<?php 
}
?>

    
<!-- #primary -->
<div id="primary" class="sidebar-<?php 
echo $st_page_sidebar_pos;
?>
 container clearfix">
<div class="container">
Example #19
0
 public function render_breadcrumb()
 {
     add_filter('bbp_no_breadcrumb', '__return_false');
     bbp_breadcrumb();
     add_filter('bbp_no_breadcrumb', '__return_true');
 }
Example #20
0
 function mfn_breadcrumbs($class = false)
 {
     global $post;
     $translate['home'] = mfn_opts_get('translate') ? mfn_opts_get('translate-home', 'Home') : __('Home', 'betheme');
     $homeLink = home_url();
     $separator = ' <span><i class="icon-right-open"></i></span>';
     // Plugin | bbPress -----------------------------------
     if (function_exists('is_bbpress') && is_bbpress()) {
         bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => '<i class="icon-right-open"></i>', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => $translate['home']));
         return true;
     }
     // end: bbPress -------------------------------------
     // Default breadcrumbs --------------------------------
     $breadcrumbs = array();
     // Home prefix --------------------------------
     $breadcrumbs[] = '<a href="' . $homeLink . '">' . $translate['home'] . '</a>';
     // Blog -------------------------------------------
     if (get_post_type() == 'post') {
         $blogID = false;
         if (get_option('page_for_posts')) {
             $blogID = get_option('page_for_posts');
             // Setings / Reading
         } elseif (mfn_opts_get('blog-page')) {
             $blogID = mfn_opts_get('blog-page');
             // Theme Options / Getting Started / Blog
         }
         if ($blogID) {
             $breadcrumbs[] = '<a href="' . get_permalink($blogID) . '">' . get_the_title($blogID) . '</a>';
         }
     }
     // Plugin | Events Calendar -------------------------------------------
     if (function_exists('tribe_is_month') && (tribe_is_event_query() || tribe_is_month() || tribe_is_event() || tribe_is_day() || tribe_is_venue())) {
         if (function_exists('tribe_get_events_link')) {
             $breadcrumbs[] = '<a href="' . tribe_get_events_link() . '">' . tribe_get_events_title() . '</a>';
         }
     } elseif (is_front_page() || is_home()) {
         // do nothing
         // Blog | Tag -------------------------------------
     } elseif (is_tag()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_tag_title('', false) . '</a>';
         // Blog | Category --------------------------------
     } elseif (is_category()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_cat_title('', false) . '</a>';
         // Blog | Author ----------------------------------
     } elseif (is_author()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_author() . '</a>';
         // Blog | Day -------------------------------------
     } elseif (is_day()) {
         $breadcrumbs[] = '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
         $breadcrumbs[] = '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a>';
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('d') . '</a>';
         // Blog | Month -----------------------------------
     } elseif (is_month()) {
         $breadcrumbs[] = '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('F') . '</a>';
         // Blog | Year ------------------------------------
     } elseif (is_year()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('Y') . '</a>';
         // Single -----------------------------------------
     } elseif (is_single() && !is_attachment()) {
         // Custom Post Type -----------------
         if (get_post_type() != 'post') {
             $post_type = get_post_type_object(get_post_type());
             $slug = $post_type->rewrite;
             $portfolio_page_id = mfn_wpml_ID(mfn_opts_get('portfolio-page'));
             // Portfolio Page ------------
             if ($slug['slug'] == mfn_opts_get('portfolio-slug', 'portfolio-item') && $portfolio_page_id) {
                 $breadcrumbs[] = '<a href="' . get_page_link($portfolio_page_id) . '">' . get_the_title($portfolio_page_id) . '</a>';
             }
             // Category ----------
             if ($portfolio_page_id) {
                 $terms = get_the_terms(get_the_ID(), 'portfolio-types');
                 if (!empty($terms) && !is_wp_error($terms)) {
                     $term = $terms[0];
                     $breadcrumbs[] = '<a href="' . get_term_link($term) . '">' . $term->name . '</a>';
                 }
             }
             // Single Item --------
             $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title() . '</a>';
             // Blog | Single --------------------
         } else {
             $cat = get_the_category();
             if (!empty($cat)) {
                 $breadcrumbs[] = get_category_parents($cat[0], true, $separator);
             }
             $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title() . '</a>';
         }
         // Taxonomy ---------------------------------------
     } elseif (!is_page() && get_post_taxonomies()) {
         // Portfolio ------------------------
         $post_type = get_post_type_object(get_post_type());
         if ($post_type->name == 'portfolio' && ($portfolio_page_id = mfn_wpml_ID(mfn_opts_get('portfolio-page')))) {
             $breadcrumbs[] = '<a href="' . get_page_link($portfolio_page_id) . '">' . get_the_title($portfolio_page_id) . '</a>';
         }
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_cat_title('', false) . '</a>';
         // Page with parent -------------------------------
     } elseif (is_page() && $post->post_parent) {
         $parent_id = $post->post_parent;
         $parents = array();
         while ($parent_id) {
             $page = get_page($parent_id);
             $parents[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
             $parent_id = $page->post_parent;
         }
         $parents = array_reverse($parents);
         $breadcrumbs = array_merge_recursive($breadcrumbs, $parents);
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title(mfn_ID()) . '</a>';
         // Default ----------------------------------------
     } else {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title(mfn_ID()) . '</a>';
     }
     // PRINT ------------------------------------------------------------------
     echo '<ul class="breadcrumbs ' . $class . '">';
     $count = count($breadcrumbs);
     $i = 1;
     foreach ($breadcrumbs as $bk => $bc) {
         if (strpos($bc, $separator)) {
             // Category parents fix
             echo '<li>' . $bc . '</li>';
         } else {
             if ($i == $count) {
                 $separator = '';
             }
             echo '<li>' . $bc . $separator . '</li>';
         }
         $i++;
     }
     echo '</ul>';
 }
Example #21
0
function memberlite_getBreadcrumbs()
{
    $page_breadcrumbs = get_theme_mod('page_breadcrumbs', false);
    $post_breadcrumbs = get_theme_mod('post_breadcrumbs', false);
    $archive_breadcrumbs = get_theme_mod('archive_breadcrumbs', false);
    $attachment_breadcrumbs = get_theme_mod('attachment_breadcrumbs', false);
    $search_breadcrumbs = get_theme_mod('search_breadcrumbs', false);
    $profile_breadcrumbs = get_theme_mod('profile_breadcrumbs', false);
    $show_breadcrumbs = '' != $page_breadcrumbs || '' != $post_breadcrumbs || '' != $archive_breadcrumbs || '' != $attachment_breadcrumbs || '' != $search_breadcrumbs || '' != $profile_breadcrumbs ? true : false;
    global $posts, $post, $memberlite_defaults;
    if ($show_breadcrumbs) {
        if (function_exists('is_woocommerce') && is_woocommerce()) {
        } elseif (function_exists('is_bbpress') && is_bbpress()) {
            ?>
		<nav class="memberlite-breadcrumb" itemprop="breadcrumb">
		<?php 
            /* Displays bbp_breadcrumb in theme masthead */
            remove_filter('bbp_no_breadcrumb', '__return_true');
            echo bbp_breadcrumb();
            add_filter('bbp_no_breadcrumb', '__return_true');
            ?>
		</nav>
		<?php 
        } elseif (is_attachment() && '' != $attachment_breadcrumbs) {
            ?>
		<nav class="memberlite-breadcrumb" itemprop="breadcrumb">
          	<a href="<?php 
            echo home_url();
            ?>
"><?php 
            _e('Home', 'memberlite');
            ?>
</a>
			<span class="sep"><?php 
            echo $memberlite_defaults['delimiter'];
            ?>
</span>
			<?php 
            global $post;
            $parent_id = $post->post_parent;
            $breadcrumbs = array();
            while ($parent_id) {
                $page = get_page($parent_id);
                $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '" title="">' . get_the_title($page->ID) . '</a><span class="sep">' . $memberlite_defaults['delimiter'] . '</span>';
                $parent_id = $page->post_parent;
            }
            $breadcrumbs = array_reverse($breadcrumbs);
            foreach ($breadcrumbs as $crumb) {
                echo $crumb;
            }
            ?>
			<?php 
            the_title();
            ?>
		</nav>
		<?php 
        } elseif (is_page() && !is_front_page() && !is_attachment() && '' != $page_breadcrumbs) {
            ?>
			
			<nav class="memberlite-breadcrumb" itemprop="breadcrumb">
				<a href="<?php 
            echo home_url();
            ?>
"><?php 
            _e('Home', 'memberlite');
            ?>
</a>
				<span class="sep"><?php 
            echo $memberlite_defaults['delimiter'];
            ?>
</span>
				<?php 
            $breadcrumbs = get_post_ancestors($post->ID);
            if ($breadcrumbs) {
                $breadcrumbs = array_reverse($breadcrumbs);
                foreach ($breadcrumbs as $crumb) {
                    ?>
							<a href="<?php 
                    echo get_permalink($crumb);
                    ?>
"><?php 
                    echo get_the_title($crumb);
                    ?>
</a>
							<span class="sep"><?php 
                    echo $memberlite_defaults['delimiter'];
                    ?>
</span>
							<?php 
                }
            }
            ?>
				<?php 
            if (function_exists("pmpro_getOption") && is_page(array(pmpro_getOption('cancel_page_id'), pmpro_getOption('billing_page_id'), pmpro_getOption('confirmation_page_id'), pmpro_getOption('invoice_page_id'))) && !in_array(pmpro_getOption('account_page_id'), get_post_ancestors($post->ID))) {
                ?>
						<a href="<?php 
                echo get_permalink(pmpro_getOption('account_page_id'));
                ?>
"><?php 
                echo get_the_title(pmpro_getOption('account_page_id'));
                ?>
</a>
						<span class="sep"><?php 
                echo $memberlite_defaults['delimiter'];
                ?>
</span>
						<?php 
            }
            ?>
				<?php 
            the_title();
            ?>
			</nav>
			<?php 
        } elseif ((is_author() || is_tag() || is_archive()) && '' != $archive_breadcrumbs) {
            ?>
		<nav class="memberlite-breadcrumb" itemprop="breadcrumb">
          	<a href="<?php 
            echo get_option('home');
            ?>
/"><?php 
            _e('Home', 'memberlite');
            ?>
</a>
			<span class="sep"><?php 
            echo $memberlite_defaults['delimiter'];
            ?>
</span>
			<?php 
            if (get_option('page_for_posts')) {
                ?>
					<a href="<?php 
                echo get_permalink(get_option('page_for_posts'));
                ?>
"><?php 
                echo get_the_title(get_option('page_for_posts'));
                ?>
</a>
					<span class="sep"><?php 
                echo $memberlite_defaults['delimiter'];
                ?>
</span>
					<?php 
            }
            ?>
			
			<?php 
            if (is_category()) {
                single_cat_title();
            } elseif (is_tag()) {
                $current_tag = single_tag_title("", false);
                printf(__('Posts Tagged: %s', 'memberlite'), '<span>' . $current_tag . '</span>');
            } elseif (is_author()) {
                printf(__('Author: %s', 'memberlite'), '<span class="vcard">' . get_the_author() . '</span>');
            } elseif (is_day()) {
                printf(__('Day: %s', 'memberlite'), '<span>' . get_the_date() . '</span>');
            } elseif (is_month()) {
                printf(__('Month: %s', 'memberlite'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'memberlite')) . '</span>');
            } elseif (is_year()) {
                printf(__('Year: %s', 'memberlite'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'memberlite')) . '</span>');
            } elseif (is_tax('post_format', 'post-format-aside')) {
                _e('Asides', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-gallery')) {
                _e('Galleries', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-image')) {
                _e('Images', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-video')) {
                _e('Videos', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-quote')) {
                _e('Quotes', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-link')) {
                _e('Links', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-status')) {
                _e('Statuses', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-audio')) {
                _e('Audios', 'memberlite');
            } elseif (is_tax('post_format', 'post-format-chat')) {
                _e('Chats', 'memberlite');
            } elseif (bbp_is_forum_archive()) {
                _e('Forums', 'memberlite');
            } else {
                _e('Archives', 'memberlite');
            }
            ?>
		</nav>
		<?php 
        } elseif (is_single() && '' != $post_breadcrumbs) {
            ?>
		<nav class="memberlite-breadcrumb" itemprop="breadcrumb">
          	<a href="<?php 
            echo home_url();
            ?>
"><?php 
            _e('Home', 'memberlite');
            ?>
</a>
			<span class="sep"><?php 
            echo $memberlite_defaults['delimiter'];
            ?>
</span>
			<?php 
            if (get_option('page_for_posts')) {
                ?>
					<a href="<?php 
                echo get_permalink(get_option('page_for_posts'));
                ?>
"><?php 
                echo get_the_title(get_option('page_for_posts'));
                ?>
</a>
					<span class="sep"><?php 
                echo $memberlite_defaults['delimiter'];
                ?>
</span>
					<?php 
            }
            ?>
			<?php 
            the_title();
            ?>
		</nav>
		<?php 
        } elseif (is_search() && '' != $search_breadcrumbs) {
            ?>
		<nav class="memberlite-breadcrumb" itemprop="breadcrumb">
          	<a href="<?php 
            echo home_url();
            ?>
"><?php 
            _e('Home', 'memberlite');
            ?>
</a>
			<span class="sep"><?php 
            echo $memberlite_defaults['delimiter'];
            ?>
</span>
			<?php 
            if (get_option('page_for_posts')) {
                ?>
					<a href="<?php 
                echo get_permalink(get_option('page_for_posts'));
                ?>
"><?php 
                echo get_the_title(get_option('page_for_posts'));
                ?>
</a>
					<span class="sep"><?php 
                echo $memberlite_defaults['delimiter'];
                ?>
</span>
					<?php 
            }
            ?>
			<?php 
            _e('Search Results For', 'memberlite');
            ?>
 '<?php 
            the_search_query();
            ?>
'
		</nav>
	<?php 
        }
    }
}
Example #22
0
function avada_current_page_title_bar($post_id)
{
    global $smof_data;
    ob_start();
    if ($smof_data['breadcrumb']) {
        if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') {
            if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) {
                woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => ''));
            } else {
                if (class_exists('bbPress') && is_bbpress()) {
                    bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada')));
                } else {
                    themefusion_breadcrumb();
                }
            }
        } else {
            get_search_form();
        }
    }
    $secondary_content = ob_get_contents();
    ob_get_clean();
    $title = '';
    $subtitle = '';
    if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
        $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
    }
    if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
        $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
    }
    if (!$title) {
        $title = get_the_title();
        if (is_home()) {
            $title = $smof_data['blog_title'];
        }
        if (is_search()) {
            $title = __('Search results for:', 'Avada') . get_search_query();
        }
        if (is_404()) {
            $title = __('Error 404 Page', 'Avada');
        }
        if (is_archive()) {
            if (is_day()) {
                $title = __('Daily Archives:', 'Avada') . '<span> ' . get_the_date() . '</span>';
            } else {
                if (is_month()) {
                    $title = __('Monthly Archives:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
                } elseif (is_year()) {
                    $title = __('Yearly Archives:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
                } elseif (is_author()) {
                    $curauth = isset($_GET['author_name']) ? get_user_by('slug', $_GET['author_name']) : get_user_by('id', get_the_author_meta('ID'));
                    $title = $curauth->nickname;
                } else {
                    $title = single_cat_title('', false);
                }
            }
        }
        if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
            if (!is_product()) {
                $title = woocommerce_page_title(false);
            }
        }
    }
    if (!$subtitle) {
        if (is_home() && !is_front_page()) {
            $subtitle = $smof_data['blog_subtitle'];
        }
    }
    if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
        if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) == 'default') {
            if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') {
                $title = '';
                $subtitle = '';
            }
            avada_page_title_bar($title, $subtitle, $secondary_content);
        }
    } else {
        if ($smof_data['page_title_bar']) {
            avada_page_title_bar($title, $subtitle, $secondary_content);
        }
    }
}
Example #23
0
 function etheme_breadcrumbs()
 {
     $showOnHome = 0;
     // 1 - show breadcrumbs on the homepage, 0 - don't show
     $delimiter = '<span class="delimeter">/</span>';
     // delimiter between crumbs
     $home = __('Home', ETHEME_DOMAIN);
     // text for the 'Home' link
     $blogPage = __('Blog', ETHEME_DOMAIN);
     $showCurrent = 1;
     // 1 - show current post/page title in breadcrumbs, 0 - don't show
     $before = '<span class="current">';
     // tag before the current crumb
     $after = '</span>';
     // tag after the current crumb
     global $post;
     $homeLink = home_url();
     if (is_front_page()) {
         if ($showOnHome == 1) {
             echo '<div id="crumbs"><a href="' . $homeLink . '">' . $home . '</a></div>';
         }
     } else {
         if (class_exists('bbPress') && is_bbpress()) {
             $bbp_args = array('before' => '<div class="breadcrumbs" id="breadcrumb">', 'after' => '</div>');
             bbp_breadcrumb($bbp_args);
         } else {
             do_action('etheme_before_breadcrumbs');
             echo '<div class="breadcrumbs">';
             echo '<div id="breadcrumb">';
             echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ';
             if (is_category()) {
                 $thisCat = get_category(get_query_var('cat'), false);
                 if ($thisCat->parent != 0) {
                     echo get_category_parents($thisCat->parent, TRUE, ' ' . $delimiter . ' ');
                 }
                 echo $before . 'Archive by category "' . single_cat_title('', false) . '"' . $after;
             } elseif (is_search()) {
                 echo $before . 'Search results for "' . get_search_query() . '"' . $after;
             } elseif (is_day()) {
                 echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
                 echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' ';
                 echo $before . get_the_time('d') . $after;
             } elseif (is_month()) {
                 echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
                 echo $before . get_the_time('F') . $after;
             } elseif (is_year()) {
                 echo $before . get_the_time('Y') . $after;
             } elseif (is_single() && !is_attachment()) {
                 if (get_post_type() == 'etheme_portfolio') {
                     $portfolioId = etheme_tpl2id('portfolio.php');
                     $portfolioLink = get_permalink($portfolioId);
                     $post_type = get_post_type_object(get_post_type());
                     $slug = $post_type->rewrite;
                     echo '<a href="' . $portfolioLink . '/">' . __($post_type->labels->name, ETHEME_DOMAIN) . '</a>';
                     if ($showCurrent == 1) {
                         echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
                     }
                 } elseif (get_post_type() != 'post') {
                     $post_type = get_post_type_object(get_post_type());
                     $slug = $post_type->rewrite;
                     echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>';
                     if ($showCurrent == 1) {
                         echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
                     }
                 } else {
                     $cat = get_the_category();
                     if (isset($cat[0])) {
                         $cat = $cat[0];
                         $cats = get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
                         if ($showCurrent == 0) {
                             $cats = preg_replace("#^(.+)\\s{$delimiter}\\s\$#", "\$1", $cats);
                         }
                         echo $cats;
                     }
                     if ($showCurrent == 1) {
                         echo $before . get_the_title() . $after;
                     }
                 }
             } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) {
                 $post_type = get_post_type_object(get_post_type());
                 echo $before . $post_type->labels->singular_name . $after;
             } elseif (is_attachment()) {
                 $parent = get_post($post->post_parent);
                 //$cat = get_the_category($parent->ID); $cat = $cat[0];
                 //echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
                 //echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a>';
                 if ($showCurrent == 1) {
                     echo ' ' . $before . get_the_title() . $after;
                 }
             } elseif (is_page() && !$post->post_parent) {
                 if ($showCurrent == 1) {
                     echo $before . get_the_title() . $after;
                 }
             } elseif (is_page() && $post->post_parent) {
                 $parent_id = $post->post_parent;
                 $breadcrumbs = array();
                 while ($parent_id) {
                     $page = get_page($parent_id);
                     $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
                     $parent_id = $page->post_parent;
                 }
                 $breadcrumbs = array_reverse($breadcrumbs);
                 for ($i = 0; $i < count($breadcrumbs); $i++) {
                     echo $breadcrumbs[$i];
                     if ($i != count($breadcrumbs) - 1) {
                         echo ' ' . $delimiter . ' ';
                     }
                 }
                 if ($showCurrent == 1) {
                     echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
                 }
             } elseif (is_tag()) {
                 echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after;
             } elseif (is_author()) {
                 global $author;
                 $userdata = get_userdata($author);
                 echo $before . 'Articles posted by ' . $userdata->display_name . $after;
             } elseif (is_404()) {
                 echo $before . 'Error 404' . $after;
             } else {
                 echo $blogPage;
             }
             if (get_query_var('paged')) {
                 if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
                     echo ' (';
                 }
                 echo ' (' . __('Page') . ' ' . get_query_var('paged') . ')';
                 if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
                     echo ')';
                 }
             }
             echo '</div>';
             et_back_to_page();
             echo '</div>';
         }
     }
 }
function oblivion_breadcrumbs()
{
    if (function_exists('is_bbpress')) {
        if (is_bbpress()) {
            bbp_breadcrumb();
        } else {
            oblivion_breadcrumbs_inner();
        }
    } else {
        oblivion_breadcrumbs_inner();
    }
}
Example #25
0
function cmo_breadcrumb()
{
    if (class_exists('Woocommerce') && is_woocommerce()) {
        woocommerce_breadcrumb(array('delimiter' => '', 'wrap_before' => '<ul class="cmo-breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'home' => __('Home', 'cumulo')));
        return;
    }
    if (function_exists("is_bbpress") && is_bbpress()) {
        bbp_breadcrumb(array('before' => '<ul class="cmo-breadcrumbs">', 'after' => '</ul>', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'sep' => '', 'pad_sep' => 0, 'sep_before' => '', 'sep_after' => '', 'current_before' => '', 'current_after' => ''));
        return;
    }
    global $post;
    echo '<ul class="cmo-breadcrumbs">';
    if (!is_front_page()) {
        echo '<li><a href="';
        echo home_url();
        echo '">' . __('Home', 'cumulo') . "</a></li>";
        // echo '"><i class="fa fa-home"></i></a></li>';
    }
    $params['link_none'] = '';
    $separator = '';
    if (is_category() && !is_singular('cmo_portfolio')) {
        $category = get_the_category();
        $ID = $category[0]->cat_ID;
        echo is_wp_error($cat_parents = get_category_parents($ID, TRUE, '', FALSE)) ? '' : '<li>' . $cat_parents . '</li>';
    }
    if (is_singular('cmo_portfolio')) {
        echo '<li><a href="' . site_url('portfolio-items') . '">' . esc_html__('Portfolio', 'cumulo') . '</a></li>';
        echo get_the_term_list($post->ID, 'portfolio_category', '<li>', ',&nbsp;', '</li>');
        echo '<li>' . get_the_title() . '</li>';
    }
    if (function_exists("is_epl_post") && is_epl_post() && !is_epl_post_archive()) {
        echo '<li><a href="' . site_url('property') . '">' . esc_html__('Properties', 'cumulo') . '</a></li>';
    }
    if (is_singular('event')) {
        $terms = get_the_term_list($post->ID, 'event-categories', '<li>', ',&nbsp;', '</li>');
        if (!is_wp_error($terms)) {
            echo get_the_term_list($post->ID, 'event-categories', '<li>', ',&nbsp;', '</li>');
        }
        echo '<li>' . get_the_title() . '</li>';
    }
    if (is_tax()) {
        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
        $link = get_term_link($term);
        if (is_wp_error($link)) {
            echo sprintf('<li>%s</li>', $term->name);
        } else {
            echo sprintf('<li><a href="%s" title="%s">%s</a></li>', $link, $term->name, $term->name);
        }
    }
    if (is_home()) {
        echo '<li>' . '' . '</li>';
        ///$smof_data['blog_page_title']
    }
    if (is_page() && !is_front_page()) {
        $parents = array();
        $parent_id = $post->post_parent;
        while ($parent_id) {
            $page = get_page($parent_id);
            if ($params["link_none"]) {
                $parents[] = get_the_title($page->ID);
            } else {
                $parents[] = '<li><a href="' . get_permalink($page->ID) . '" title="' . get_the_title($page->ID) . '">' . get_the_title($page->ID) . '</a></li>' . $separator;
            }
            $parent_id = $page->post_parent;
        }
        $parents = array_reverse($parents);
        echo join('', $parents);
        echo '<li>' . get_the_title() . '</li>';
    }
    if (is_single() && !is_singular('cmo_portfolio') && !is_singular('tribe_events') && !is_singular('event') && !is_singular('wpfc_sermon')) {
        $categories_1 = get_the_category($post->ID);
        if ($categories_1) {
            foreach ($categories_1 as $cat_1) {
                $cat_1_ids[] = $cat_1->term_id;
            }
            $cat_1_line = implode(',', $cat_1_ids);
        }
        if (isset($cat_1_line) && $cat_1_line) {
            $categories = get_categories(array('include' => $cat_1_line, 'orderby' => 'id'));
            if ($categories) {
                echo '<li>';
                $cats = '';
                foreach ($categories as $cat) {
                    if ($cats != '') {
                        $cats .= ', ';
                    }
                    $cats .= '<a href="' . get_category_link($cat->term_id) . '" title="' . $cat->name . '">' . $cat->name . '</a>';
                }
                echo $cats;
                echo '</li>';
            }
        }
        echo '<li>' . get_the_title() . '</li>';
    }
    if (is_tag()) {
        echo '<li>' . "Tag: " . single_tag_title('', FALSE) . '</li>';
    }
    if (is_search()) {
        echo '<li>' . __("Search", 'cumulo') . '</li>';
    }
    if (is_404()) {
        echo '<li>' . __("404 - Page Not Found", 'cumulo') . '</li>';
    }
    if (is_archive() && is_post_type_archive()) {
        $title = post_type_archive_title('', false);
        $sermon_settings = get_option('wpfc_options');
        if (is_array($sermon_settings)) {
            $title = $sermon_settings['archive_title'];
        }
        echo '<li>' . $title . '</li>';
    }
    echo "</ul>";
}
<?php

/**
 * Single View Content Part
 *
 * @package bbPress
 * @subpackage Theme
 */
?>

<div id="bbpress-forums">

	<?php 
bbp_breadcrumb();
?>

	<?php 
bbp_set_query_name(bbp_get_view_rewrite_id());
?>

	<?php 
if (bbp_view_query()) {
    ?>

		<?php 
    bbp_get_template_part('pagination', 'topics');
    ?>

		<?php 
    bbp_get_template_part('loop', 'topics');
    ?>
 function ts_breadcrumbs()
 {
     global $smof_data;
     if (ts_has_woocommerce()) {
         if (function_exists('woocommerce_breadcrumb') && function_exists('is_woocommerce') && is_woocommerce()) {
             woocommerce_breadcrumb(array('wrap_before' => '<div class="breadcrumbs"><div class="breadcrumbs-container">', 'delimiter' => '<span>&#47;</span>', 'wrap_after' => '</div></div>'));
             return;
         }
     }
     if (function_exists('bbp_breadcrumb') && function_exists('is_bbpress') && is_bbpress()) {
         $args = array('before' => '<div class="breadcrumbs"><div class="breadcrumbs-container">', 'after' => '</div></div>', 'sep' => is_rtl() || isset($smof_data['ts_enable_rtl']) && $smof_data['ts_enable_rtl'] ? '\\' : '/', 'sep_before' => '<span class="brn_arrow">', 'sep_after' => '</span>', 'current_before' => '<span class="current">', 'current_after' => '</span>');
         bbp_breadcrumb($args);
         /* Remove bbpress breadcrumbs */
         add_filter('bbp_no_breadcrumb', '__return_true', 999);
         return;
     }
     $delimiter = '<span class="brn_arrow">/</span>';
     if (is_rtl() || isset($smof_data['ts_enable_rtl']) && $smof_data['ts_enable_rtl']) {
         $delimiter = '<span class="brn_arrow">\\</span>';
     }
     $front_id = get_option('page_on_front');
     if (!empty($front_id)) {
         $home = get_the_title($front_id);
     } else {
         $home = esc_html__('Home', 'gon');
     }
     $ar_title = array('search' => esc_html__('Search results for ', 'gon'), '404' => esc_html__('Error 404', 'gon'), 'tagged' => esc_html__('Tagged ', 'gon'), 'author' => esc_html__('Articles posted by ', 'gon'), 'page' => esc_html__('Page', 'gon'), 'portfolio' => esc_html__('Portfolio', 'gon'));
     $before = '<span class="current">';
     /* tag before the current crumb */
     $after = '</span>';
     /* tag after the current crumb */
     global $wp_rewrite;
     $rewriteUrl = $wp_rewrite->using_permalinks();
     if (!is_home() && !is_front_page() || is_paged()) {
         echo '<div class="breadcrumbs"><div class="breadcrumbs-container">';
         global $post;
         $homeLink = esc_url(home_url('/'));
         echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ';
         if (is_category()) {
             global $wp_query;
             $cat_obj = $wp_query->get_queried_object();
             $thisCat = $cat_obj->term_id;
             $thisCat = get_category($thisCat);
             $parentCat = get_category($thisCat->parent);
             if ($thisCat->parent != 0) {
                 echo get_category_parents($parentCat, true, ' ' . $delimiter . ' ');
             }
             echo $before . single_cat_title('', false) . $after;
         } elseif (is_search()) {
             echo $before . $ar_title['search'] . '"' . get_search_query() . '"' . $after;
         } elseif (is_day()) {
             echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
             echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' ';
             echo $before . get_the_time('d') . $after;
         } elseif (is_month()) {
             echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
             echo $before . get_the_time('F') . $after;
         } elseif (is_year()) {
             echo $before . get_the_time('Y') . $after;
         } elseif (is_single() && !is_attachment()) {
             if (get_post_type() != 'post') {
                 $post_type = get_post_type_object(get_post_type());
                 $slug = $post_type->rewrite;
                 $post_type_name = $post_type->labels->singular_name;
                 if (strcmp('Portfolio Item', $post_type->labels->singular_name) == 0) {
                     $post_type_name = $ar_title['portfolio'];
                 }
                 if ($rewriteUrl) {
                     echo '<a href="' . $homeLink . $slug['slug'] . '/">' . $post_type_name . '</a> ' . $delimiter . ' ';
                 } else {
                     echo '<a href="' . $homeLink . '?post_type=' . get_post_type() . '">' . $post_type_name . '</a> ' . $delimiter . ' ';
                 }
                 echo $before . get_the_title() . $after;
             } else {
                 $cat = get_the_category();
                 $cat = $cat[0];
                 echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
                 echo $before . get_the_title() . $after;
             }
         } elseif (!is_single() && !is_page() && get_post_type() != 'post' && !is_404()) {
             $post_type = get_post_type_object(get_post_type());
             $slug = $post_type->rewrite;
             $post_type_name = $post_type->labels->singular_name;
             if (strcmp('Portfolio Item', $post_type->labels->singular_name) == 0) {
                 $post_type_name = $ar_title['portfolio'];
             }
             if (is_tag()) {
                 echo $before . $ar_title['tagged'] . '"' . single_tag_title('', false) . '"' . $after;
             } elseif (is_taxonomy_hierarchical(get_query_var('taxonomy'))) {
                 if ($rewriteUrl) {
                     echo '<a href="' . $homeLink . $slug['slug'] . '/">' . $post_type_name . '</a> ' . $delimiter . ' ';
                 } else {
                     echo '<a href="' . $homeLink . '?post_type=' . get_post_type() . '">' . $post_type_name . '</a> ' . $delimiter . ' ';
                 }
                 $curTaxanomy = get_query_var('taxonomy');
                 $curTerm = get_query_var('term');
                 $termNow = get_term_by('name', $curTerm, $curTaxanomy);
                 $pushPrintArr = array();
                 if ($termNow !== false) {
                     while ((int) $termNow->parent != 0) {
                         $parentTerm = get_term((int) $termNow->parent, get_query_var('taxonomy'));
                         array_push($pushPrintArr, '<a href="' . get_term_link((int) $parentTerm->term_id, $curTaxanomy) . '">' . $parentTerm->name . '</a> ' . $delimiter . ' ');
                         $curTerm = $parentTerm->name;
                         $termNow = get_term_by('name', $curTerm, $curTaxanomy);
                     }
                 }
                 $pushPrintArr = array_reverse($pushPrintArr);
                 array_push($pushPrintArr, $before . get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'))->name . $after);
                 echo implode($pushPrintArr);
             } else {
                 echo $before . $post_type_name . $after;
             }
         } elseif (is_attachment()) {
             if ((int) $post->post_parent > 0) {
                 $parent = get_post($post->post_parent);
                 $cat = get_the_category($parent->ID);
                 if (count($cat) > 0) {
                     $cat = $cat[0];
                     echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
                 }
                 echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> ' . $delimiter . ' ';
             }
             echo $before . get_the_title() . $after;
         } elseif (is_page() && !$post->post_parent) {
             echo $before . get_the_title() . $after;
         } elseif (is_page() && $post->post_parent) {
             $parent_id = $post->post_parent;
             $breadcrumbs = array();
             while ($parent_id) {
                 $page = get_post($parent_id);
                 $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
                 $parent_id = $page->post_parent;
             }
             $breadcrumbs = array_reverse($breadcrumbs);
             foreach ($breadcrumbs as $crumb) {
                 echo $crumb . ' ' . $delimiter . ' ';
             }
             echo $before . get_the_title() . $after;
         } elseif (is_tag()) {
             echo $before . $ar_title['tagged'] . '"' . single_tag_title('', false) . '"' . $after;
         } elseif (is_author()) {
             global $author;
             $userdata = get_userdata($author);
             echo $before . $ar_title['author'] . $userdata->display_name . $after;
         } elseif (is_404()) {
             echo $before . $ar_title['404'] . $after;
         }
         if (get_query_var('paged')) {
             if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() || is_page_template() || is_post_type_archive() || is_archive()) {
                 echo $before . ' (';
             }
             echo $ar_title['page'] . ' ' . get_query_var('paged');
             if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() || is_page_template() || is_post_type_archive() || is_archive()) {
                 echo ')' . $after;
             }
         } else {
             if (get_query_var('page')) {
                 if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() || is_page_template() || is_post_type_archive() || is_archive()) {
                     echo $before . ' (';
                 }
                 echo $ar_title['page'] . ' ' . get_query_var('page');
                 if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() || is_page_template() || is_post_type_archive() || is_archive()) {
                     echo ')' . $after;
                 }
             }
         }
         echo '</div></div>';
     }
     wp_reset_postdata();
 }