-
AuthorPosts
-
March 5, 2019 at 7:12 pm #1075030
Hello,
When you search by category on our blog, the results are returned in a really odd formatting. We would just like them to look as they do on the blog landing page (see private data).
Any advice on how we can maintain that look—featured image, left justified, blog sidebar and widgets?
If we can’t get the same formatting that we have on the blog front page, is there a way we can at least maintain the featured image and have all the content aligned with the post date, comments and author?
Thanks!
March 7, 2019 at 11:53 pm #1076147Hey raisonbrands,
Could this post help you out?
https://kriesi.at/support/topic/search-results-page-grid-layout/Best regards,
BasilisMarch 8, 2019 at 10:29 pm #1076484Hey Basilis,
Thanks for the link, I used the first suggestion as my problem has nothing to do with Woo prices. Unofrtunately, the blog category results look exactly the same.
Please let me know if I screwed something up.
search.php file (Enfold, site runs a child theme)
<?php
if ( !defined(‘ABSPATH’) ){ die(); }global $avia_config;
/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();// allows to customize the layout
do_action( ‘ava_search_after_get_header’ );$results = avia_which_archive();
echo avia_title(array(‘title’ => $results ));do_action( ‘ava_after_main_title’ );
?><div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
<div class=’container’>
<main class=’content template-search <?php avia_layout_class( ‘content’ ); ?> units’ <?php avia_markup_helper(array(‘context’ => ‘content’));?>>
<div class=’page-heading-container clearfix’>
<section class=”search_form_field”>
<?php
echo “<h4>”.__(‘New Search’,’avia_framework’).”</h4>”;
echo “<p>”.__(‘If you are not happy with the results below please do another search’,’avia_framework’).”</p>”;get_search_form();
echo “<span class=’author-extra-border’></span>”;
?>
</section>
</div><?php
if(!empty($_GET[‘s’]) || have_posts())
{
echo “<h4 class=’extra-mini-title widgettitle’>{$results}</h4>”;/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-search.php and that will be used instead.
*/
$more = 0;
global $posts;
$post_ids = array();
foreach($posts as $post) $post_ids[] = $post->ID;if(!empty($post_ids))
{
$atts = array(
‘type’ => ‘grid’,
‘items’ => get_option(‘posts_per_page’),
‘columns’ => 3,
‘class’ => ‘avia-builder-el-no-sibling’,
‘paginate’ => ‘yes’,
‘use_main_query_pagination’ => ‘yes’,
‘custom_query’ => array( ‘post__in’=>$post_ids, ‘post_type’=>get_post_types() )
);$blog = new avia_product_slider($atts);
$blog->query_entries();
echo “<div class=’entry-content-wrapper’>”.$blog->html().”</div>”;
}?>
<!–end content–>
</main><?php
//get the sidebar
$avia_config[‘currently_viewing’] = ‘page’;get_sidebar();
?>
</div><!–end container–>
</div><!– close default .container_wrap element –>
<?php get_footer(); ?>
Then Quick CSS:
.template-search .post-entry.slide-entry {
position: relative;
clear: none;
}#top .av-main-nav > li > a {
font-weight: normal !important;
}.avia-menu-fx {
display: none;
}.avia-layerslider.avia-shadow {
box-shadow: none !important;
}.av-iconlist-small li {
margin-bottom: 3px;
font-family: “adelle-sans”,sans-serif !important;
font-style: normal;
font-weight: 300;
}.avia-button {
font-size: 18px!important;
}.avia-arrow {
display: none;
}#top .av-caption-style-overlay a.av-masonry-item-with-image .av-inner-masonry-content {
background:rgba(236,0,140,0.9) !important;
}.av-masonry-sort * {
font-size: 17px;
}.avia-testimonial-content {
background-color: #ffffff!important;
border-color: rgba(255,255,255,0.7)!important;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
}.avia-testimonial-name {
font-size: 18px !important;
line-height: 27px !important;
color: #000000!important;
font-weight: 300;}
.avia-testimonial-subtitle {
font-size: 17px !important;
#595959!important;
}.home #layer_slider_1 .ls-wrapper.ls-in-out {
text-shadow: 0px 0px 15px #000000;
}@media only screen and (max-width: 767px) {
figcaption.av-inner-masonry-content {
display: none!important;
}}span.logo {
margin-top: 5px;
}#footer .widget {
text-align: center;
}#footer {
padding: 0;
}#footer p {
font-size: 13px!important;
}#footer .widget{
margin-bottom:0px!important;
}#socket .copyright {
text-align: center;
width: 100%;
}#socket .social_bookmarks {
text-align: center;
width: 60%;
}#footer {
padding-bottom: 0;
}.widgettitle {
text-transform: none;
}March 12, 2019 at 8:09 am #1077709Hi,
It is not easy for us to understand it like that – possible to show us live and provide us access?
Best regards,
BasilisMarch 12, 2019 at 4:28 pm #1077855Sure thing and thanks, see below.
March 18, 2019 at 12:51 pm #1079856Hi,
Thanks for the update.
We notice that the site is still using an older version of the theme, 4.4.1. You have to upgrade it to the latest version and hopefully, the upgrade will fix the category template issue.
Best regards,
IsmaelMarch 18, 2019 at 4:17 pm #1079935All righty, that wil take a little bit of doing to set up a dev space (we just launched the site) but I’ll let you know if that does the trick in a week or so.
Thanks Ismael
March 20, 2019 at 4:34 pm #1080903 -
AuthorPosts
- You must be logged in to reply to this topic.