Skip to content

Commit

Permalink
Remove custom breadcrumb function
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Jul 2, 2015
1 parent a447abf commit 9c714b1
Show file tree
Hide file tree
Showing 19 changed files with 330 additions and 1,137 deletions.
8 changes: 4 additions & 4 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

<div id="content" role="main">

<?php stormbringer_breadcrumb();?>
<?php if ( function_exists( 'yoast_breadcrumb' ) ) : yoast_breadcrumb(); endif; ?>

<?php
get_template_part( 'content', 'none' );
?>
<?php
get_template_part( 'content', 'none' );
?>

</div>
<!-- /#content -->
Expand Down
114 changes: 41 additions & 73 deletions archive-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,76 +7,44 @@
*/
?>
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly


get_header('shop'); ?>

<?php
/**
* woocommerce_before_main_content hook
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action('woocommerce_before_main_content');
?>

<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>

<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>

<?php endif; ?>

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

<?php if ( have_posts() ) :
ob_start();



/**
* woocommerce_before_shop_loop hook
*
* @hooked woocommerce_result_count - 20
* @hooked woocommerce_catalog_ordering - 30
* @hooked setup grid - 40
*/
do_action( 'woocommerce_before_shop_loop' );


do_action( 'shop_loop' );
/**
* woocommerce_after_shop_loop hook
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );

echo '<div class="woocommerce">' . ob_get_clean() . '</div>';

elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>

<?php woocommerce_get_template( 'loop/no-products-found.php' ); ?>

<?php endif; ?>

<?php
/**
* woocommerce_after_main_content hook
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action('woocommerce_after_main_content');
?>

<?php
/**
* woocommerce_sidebar hook
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action('woocommerce_sidebar');
?>

<?php get_footer('shop'); ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly


get_header( 'shop' ); ?>

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

<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>

<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>

<?php endif; ?>

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

<?php if ( have_posts() ) :
ob_start();

do_action( 'woocommerce_before_shop_loop' );
do_action( 'shop_loop' );
do_action( 'woocommerce_after_shop_loop' );

echo '<div class="woocommerce">' . ob_get_clean() . '</div>';

elseif ( ! woocommerce_product_subcategories( array(
'before' => woocommerce_product_loop_start( false ),
'after' => woocommerce_product_loop_end( false )
) )
) : ?>

<?php woocommerce_get_template( 'loop/no-products-found.php' ); ?>

<?php endif; ?>

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

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

<?php get_footer( 'shop' ); ?>
77 changes: 39 additions & 38 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,60 @@
?>
<?php get_header(); ?>

<div id="content" role="main">
<div id="content" role="main">

<?php stormbringer_breadcrumb(); ?>
<?php if ( function_exists( 'yoast_breadcrumb' ) ) : yoast_breadcrumb(); endif; ?>

<header class="page-header archive-header">
<header class="page-header archive-header">

<?php
the_archive_title( '<h1 class="page-title archive-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php
the_archive_title( '<h1 class="page-title archive-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>

<?php
// Category feed
if ( is_category() ) {
$category = get_the_category();
echo '<a href="'.get_category_feed_link( $category[0]->term_id).'" class="taxonomy-feed">'.__("Feed",'stormbringer').'</a>';
}
?>
<?php
// Category feed
if ( is_category() ) {
$category = get_the_category();
echo '<a href="' . get_category_feed_link( $category[0]->term_id ) . '" class="taxonomy-feed">' . __( "Feed", 'stormbringer' ) . '</a>';
}
?>

<?php
// Author vcard
if (is_author()) {
$queried_object = get_queried_object();
?>
<?php _e('Posts by:', 'stormbringer'); ?><span class="vcard"><a class="url fn n" href="<?php echo esc_url(get_author_posts_url(get_the_author_meta("ID"))); ?>" title="<?php echo esc_attr(get_the_author()); ?>" rel="me"><?php echo get_the_author(); ?></a>
<?php } ?>
<?php
// Author vcard
if (is_author()) {
$queried_object = get_queried_object();
?>
<?php _e( 'Posts by:', 'stormbringer' ); ?>
<span class="vcard"><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ); ?>" title="<?php echo esc_attr( get_the_author() ); ?>" rel="me"><?php echo get_the_author(); ?></a>
<?php } ?>

</header>
</header>

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

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

<?php
$type = get_post_type();
get_template_part( 'content', $type );
?>
<?php
$type = get_post_type();
get_template_part( 'content', $type );
?>

<?php endwhile; ?>
<?php endwhile; ?>

<?php the_posts_pagination(); ?>
<?php the_posts_pagination(); ?>

<?php else : ?>
<?php else : ?>

<?php
/* No results */
get_template_part( 'content', 'none' );
?>
<?php
/* No results */
get_template_part( 'content', 'none' );
?>

<?php endif; ?>
<?php endif; ?>

</div>
<!-- /#content -->
</div>
<!-- /#content -->

<?php get_sidebar( 'blog' ); ?>

Expand Down
Loading

0 comments on commit 9c714b1

Please sign in to comment.