当前位置: 首页>>代码示例>>PHP>>正文


PHP bbp_breadcrumb函数代码示例

本文整理汇总了PHP中bbp_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_breadcrumb函数的具体用法?PHP bbp_breadcrumb怎么用?PHP bbp_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bbp_breadcrumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: breadcrumbs

 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>"';
//.........这里部分代码省略.........
开发者ID:boutitinizar,项目名称:bati-men,代码行数:101,代码来源:theme_utils.php

示例2: breadcrumb

			<?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 
开发者ID:devmoonshine,项目名称:development,代码行数:31,代码来源:title-breadcrumb.php

示例3: if

	<?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']; ?>'
	 };
开发者ID:verbazend,项目名称:AWFA,代码行数:31,代码来源:header_nonstatic.php

示例4: avada_current_page_title_bar

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);
            }
        }
    }
}
开发者ID:ftopolovec,项目名称:proart,代码行数:92,代码来源:custom_functions.php

示例5: home_url

					<?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>'));
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:30,代码来源:header-bbpress.php

示例6: is_bbpress

} 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 
开发者ID:Snaehild,项目名称:GH2016,代码行数:31,代码来源:header.php

示例7: quest_breadcrumb

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>";
}
开发者ID:NEU-Libraries,项目名称:drs-toolkit-wp-theme,代码行数:67,代码来源:functions.php

示例8: crystalskull_breadcrumbs

function crystalskull_breadcrumbs()
{
    if (function_exists('is_bbpress')) {
        if (is_bbpress()) {
            bbp_breadcrumb();
        } else {
            crystalskull_breadcrumbs_inner();
        }
    } else {
        crystalskull_breadcrumbs_inner();
    }
}
开发者ID:Snaehild,项目名称:GH2016,代码行数:12,代码来源:functions.php

示例9: ddw_gwnf_bbpress_widgetized_noresults_content

/**
 * 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');
}
开发者ID:BarkerCA,项目名称:parallax,代码行数:25,代码来源:gwnf-bbpress-widgetized-noresults.php

示例10: quest_breadcrumb

 /**
  * 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>";
 }
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:53,代码来源:template-tags.php

示例11: orizon_breadcrumbs

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();
    }
}
开发者ID:Catreina,项目名称:Catreina.com,代码行数:14,代码来源:functions.php

示例12: breadcrumbs

 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;
//.........这里部分代码省略.........
开发者ID:severnrescue,项目名称:web,代码行数:101,代码来源:helper.php

示例13: catreina_breadcrumbs

 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');
         }
     }
 }
开发者ID:Catreina,项目名称:Catreina.com,代码行数:53,代码来源:catreina.com-plugin.php

示例14: ktz_crumbs

 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>';
         }
     }
 }
开发者ID:gigikir,项目名称:adebe,代码行数:72,代码来源:_navigation_ktz.php

示例15: if

<?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' ); ?>
开发者ID:niamherinoc,项目名称:rctractors,代码行数:31,代码来源:form-reply.php


注:本文中的bbp_breadcrumb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。