You need to add this code to your child themeâs functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please donât add custom code directly to your parent themeâs functions.php file as this will be wiped entirely when you update the theme. /** * Hide loop read more buttons for […]
Tag: genesis theme add header
Show cart contents / total
Posted on — Leave a commentAdd this code to your child themeâs functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent themeâs functions.php file, as this will be wiped entirely when you update the theme. To display the cart contents and total in your template, use something like: […]
Display My Account link in a template file
Posted on — Leave a commentDisplays a link to the user account section. If the user is not logged in the link will display âLogin / Registerâ and take the use to the login / signup page. If the user is logged in the link will display âMy accountâ and take them directly to their account. if ( is_user_logged_in() ) […]
Sample products loop
Posted on — Leave a comment<ul class=”products”> <?php $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 12 ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); wc_get_template_part( ‘content’, ‘product’ ); endwhile; } else { echo __( ‘No products found’ ); } wp_reset_postdata(); ?> </ul><!â/.productsâ>
Disable the default stylesheet
Posted on — Leave a commentYou need to add code to your child themeâs functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please donât add custom code directly to your parent themeâs functions.php file as this will be wiped entirely when you update the theme. Disable all stylesheets WooCommerce enqueues 3 stylesheets by default. You […]
Change number of products per row
Posted on — Leave a commentAdd code to your child themeâs functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent themeâs functions.php file as this will be wiped entirely when you update the theme. Defines where âfirstâ and âlastâ classes are applied in product archives. Please be aware […]