seo tweaks

This commit is contained in:
opportus 2016-07-29 20:41:19 +02:00
parent 4a23c41ab2
commit b899a8991d
7 changed files with 18 additions and 14 deletions

View File

@ -532,8 +532,10 @@ if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
/**
* Show the product title in the product loop. By default this is an H3.
*/
function woocommerce_template_loop_product_title() {
echo '<h3>' . get_the_title() . '</h3>';
function woocommerce_template_loop_product_title() {
$tag = is_product_taxonomy() || is_shop() ? 'h2' : 'h3';
echo '<' . $tag . '>' . get_the_title() . '</' . $tag . '>';
}
}
if ( ! function_exists( 'woocommerce_template_loop_category_title' ) ) {
@ -543,14 +545,14 @@ if ( ! function_exists( 'woocommerce_template_loop_category_title' ) ) {
*/
function woocommerce_template_loop_category_title( $category ) {
?>
<h3>
<h2>
<?php
echo $category->name;
if ( $category->count > 0 )
echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count">(' . $category->count . ')</mark>', $category );
?>
</h3>
</h2>
<?php
}
}

View File

@ -67,7 +67,9 @@ if ( ! comments_open() ) {
$comment_form = array(
'title_reply' => have_comments() ? __( 'Add a review', 'woocommerce' ) : sprintf( __( 'Be the first to review &ldquo;%s&rdquo;', 'woocommerce' ), get_the_title() ),
'title_reply_to' => __( 'Leave a Reply to %s', 'woocommerce' ),
'title_reply_to' => __( 'Leave a Reply to %s', 'woocommerce' ),
'title_reply_before' => '<span id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</span>',
'comment_notes_after' => '',
'fields' => array(
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'woocommerce' ) . ' <span class="required">*</span></label> ' .

View File

@ -46,9 +46,9 @@ $woocommerce_loop['columns'] = apply_filters( 'woocommerce_related_products_colu
if ( $products->have_posts() ) : ?>
<div class="related products">
<section class="related products">
<h2><?php _e( 'Related Products', 'woocommerce' ); ?></h2>
<h2><?php echo sprintf( __( 'Other %s...', 'woocommerce' ), $product->get_categories() ); ?></h2>
<?php woocommerce_product_loop_start(); ?>
@ -60,7 +60,7 @@ if ( $products->have_posts() ) : ?>
<?php woocommerce_product_loop_end(); ?>
</div>
</section>
<?php endif;

View File

@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
global $product;
$heading = apply_filters( 'woocommerce_product_additional_information_heading', __( 'Additional Information', 'woocommerce' ) );
$heading = apply_filters( 'woocommerce_product_additional_information_heading', sprintf( __( 'Additional information for %s', 'woocommerce' ), get_the_title() ) );
?>

View File

@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
global $post;
$heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Product Description', 'woocommerce' ) ) );
$heading = esc_html( apply_filters( 'woocommerce_product_description_heading', sprintf( __( 'Description for %s', 'woocommerce' ), get_the_title() ) ) );
?>

View File

@ -39,9 +39,9 @@ if ( ! empty( $tabs ) ) : ?>
<?php endforeach; ?>
</ul>
<?php foreach ( $tabs as $key => $tab ) : ?>
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--<?php echo esc_attr( $key ); ?> panel entry-content wc-tab" id="tab-<?php echo esc_attr( $key ); ?>">
<section class="woocommerce-Tabs-panel woocommerce-Tabs-panel--<?php echo esc_attr( $key ); ?> panel entry-content wc-tab" id="tab-<?php echo esc_attr( $key ); ?>">
<?php call_user_func( $tab['callback'], $key, $tab ); ?>
</div>
</section>
<?php endforeach; ?>
</div>

View File

@ -43,7 +43,7 @@ $woocommerce_loop['columns'] = apply_filters( 'woocommerce_up_sells_columns', $c
if ( $products->have_posts() ) : ?>
<div class="up-sells upsells products">
<section class="up-sells upsells products">
<h2><?php _e( 'You may also like&hellip;', 'woocommerce' ) ?></h2>
@ -57,7 +57,7 @@ if ( $products->have_posts() ) : ?>
<?php woocommerce_product_loop_end(); ?>
</div>
</section>
<?php endif;