Hi Themeco,
Wordpress 4.9.8
Pro 2.2.5
WooCommerce 3.4.4
I’m following this thread
Later updated with:
I’ve created _index.php in website-root/wp-content/themes/pro-child/framework/views/global/ _index.php
<?php
// =============================================================================
// VIEWS/GLOBAL/_INDEX.PHP
// -----------------------------------------------------------------------------
// Includes the index output.
// =============================================================================
$stack = x_get_stack();
if ( is_home() ) :
$style = x_get_option( 'x_blog_style' );
$cols = x_get_option( 'x_blog_masonry_columns' );
$condition = is_home() && $style == 'masonry';
elseif ( is_archive() ) :
$style = x_get_option( 'x_archive_style' );
$cols = x_get_option( 'x_archive_masonry_columns' );
$condition = is_archive() && $style == 'masonry';
elseif ( is_search() ) :
$style = x_get_option( 'x_archive_style' );
$cols = 3;
$condition = is_search();
endif;
?>
<?php if ( $condition ) : ?>
<?php x_get_view( 'global', '_script', 'isotope-index' ); ?>
<div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( $stack != 'ethos' ) : ?>
<?php x_get_view( $stack, 'content', get_post_format() ); ?>
<?php else : ?>
<?php x_ethos_entry_cover( 'main-content' ); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<?php x_get_view( 'global', '_content-none' ); ?>
<?php endif; ?>
</div>
<?php else : ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( $stack, 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php x_get_view( 'global', '_content-none' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php pagenavi(); ?>
The search results do not seem to appear to screen, though I can see the generated HTML and isoptope scriipt code. Using Developer Tools it looks like none of required x-iso- CSS classes are being generated as per the blog example which includes lots of x-iso- classes
http://demo.theme.co/integrity-1/blog/
I have site and content set to Fullwidth, I’ve tried with both the Ingritiy and Ethos stacks, does it work with Ethos?
As I understand the child theme _index.php is a copy of website-root/wp-content/themes/pro/framework/views/global/_index.php with
elseif ( is_search() ) :
$condition = false;
endif;
REPLACED with:
elseif ( is_search() ) :
$style = x_get_option( 'x_archive_style' );
$cols = 3;
$condition = is_search();
endif;
Is there something I’ve missed?