Alter shop page lay-out in OceanWP theme
Question
In OceanWP, I want to alter my shop page by a Beaver Builder template so I modified part of the index.php file as follows:
<?php
// Define counter for clearing floats
$oceanwp_count = 0; ?>
<?php
// BLOG PAGE
if ( is_home() ) {
/* Beaver Builder generated content for "Posts archive template" */
echo do_shortcode( '[fl_builder_insert_layout slug="posts-archive-template"]' );
// SHOP PAGE
} elseif ( is_shop() ) {
/* Beaver Builder generated content for "Shop archive template" */
echo do_shortcode( '[fl_builder_insert_layout slug="products-archive-template"]' );
// JOBS PAGE
} elseif ( is_post_type_archive( 'jobs' ) ) {
/* Beaver Builder generated content for "Jobs archive template" */
echo do_shortcode( '[fl_builder_insert_layout slug="jobs-archive-template"]' );
// OTHER POST PAGES
} else {
// Loop through posts
while ( have_posts() ) : the_post(); ?>
<?php
// Add to counter
$oceanwp_count++; ?>
<?php
// Get post entry content
get_template_part( 'partials/entry/layout', get_post_type() ); ?>
<?php
// Reset counter to clear floats
if ( oceanwp_blog_entry_columns() == $oceanwp_count ) {
$oceanwp_count=0;
} ?>
<?php endwhile;
}
?>
Blog page & jobs page do display the Beaver Builder template, however for the shop page, I don’t manage to alter the lay-out. What am I doing wrong here?
0
theme-development, woocommerce
3 years
2020-06-08T11:10:20-05:00
2020-06-08T11:10:20-05:00 0 Answers
75 views
0
Leave an answer