Tagged: x
-
AuthorPosts
-
May 22, 2016 at 4:07 pm #1004138
mpanesarParticipantHi all,
I wanted to configure the way that x-theme displays the search results, at present it is shown with a very bad layout compared to the blog and archive pages. My main is to replicate the blog or archive layout with the search results:
I have modified the _index.php under x-child theme however no changes have been seen:
$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 = x_get_option( 'x_archive_masonry_columns' ); $condition = is_archive() && $style == 'masonry'; endif; ?>Any guidance or feedback would be greatly appreciated 🙂
May 22, 2016 at 9:51 pm #1004493
LelyModeratorHello There,
Please try this code instead:
<?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() ) : $cols = x_get_option( 'x_archive_masonry_columns' ); $condition = true; endif; ?>Hope this helps.
May 23, 2016 at 4:32 pm #1006010
mpanesarParticipantExcellent – thanks!!
May 23, 2016 at 4:51 pm #1006041
RahulModeratorYou’re most welcome!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1004138 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
