Mike Jolley on "[Plugin: WooCommerce] Change header size (stretched on shop pages)"

ساخت وبلاگ

Hi,

Yes I did. I tried the 'Using our catch-all woocommerce_content() function inside your theme.' Didn't try the 'Using hooks' since I'm not at all experienced.

I copied the page.php and renamed it to woocommerce.php

The original code was:

<?php
/** * The template for displaying all pages. * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site will use a * different template. * * @package FlyMag */
get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php // If Idea are open or we have at least one comment, load up the comment template if ( Idea_open() || get_Idea_number() ) : Idea_template(); endif; ?> <?php endwhile; // end of the loop. ?> </main><!-- #main --> </div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

How I changed it:

<?php
/** * The template for displaying all pages. * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site will use a * different template. * * @package FlyMag */
get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php woocommerce_content(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php // If Idea are open or we have at least one comment, load up the comment template if ( Idea_open() || get_Idea_number() ) : Idea_template(); endif; ?> <?php woocommerce_content(); ?> </main><!-- #main --> </div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Am I missing something?

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 283 تاريخ : دوشنبه 28 تير 1395 ساعت: 21:37