-
AuthorPosts
-
October 3, 2016 at 4:18 pm #694706
Hi i find the solution to display the search results in columns with this code:
’ve seen a topic where is asking this. This is the answer:1) Insert following code into the quick css field:
.template-search .post-entry {
clear: none !important;
}2) In search.php replace:
if(!empty($_GET[‘s’]))
{
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;
get_template_part( ‘includes/loop’, ‘search’ );}
with:
if(!empty($_GET[‘s’]))
{
echo “<h4 class=’extra-mini-title widgettitle’>{$results}</h4>”;global $posts;
$post_ids = array();
foreach($posts as $post) $post_ids[] = $post->ID;$atts = array(
‘type’ => ‘grid’,
‘items’ => get_option(‘posts_per_page’),
‘columns’ => 2,
‘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_post_slider($atts);
$blog->query_entries();
echo “<div class=’entry-content’>”.$blog->html().”</div>”;
}But how can i remove the meta data: categories, comments and date? The only thing that has to be displaid here, are the title with permalink and the featured image.
- This topic was modified 8 years, 3 months ago by TanjaV.
October 4, 2016 at 6:37 am #694884Hi TanjaV,
Could you post a link to the site in question so that we can take a closer look please?
Regards,
RikardOctober 5, 2016 at 11:08 am #695404The search is only activated on a conceptpage because the site is online and not in development mode. So i give you the info as private content.
October 6, 2016 at 7:01 am #695863Hi,
Thanks for the login details, please try the following in Quick CSS under Enfold–>General Styling:
.search-results .slide-meta { display:none; }
Best regards,
RikardOctober 11, 2016 at 10:46 am #697722Thanks! That works great!
- This reply was modified 8 years, 3 months ago by TanjaV.
October 12, 2016 at 3:27 am #698132 -
AuthorPosts
- The topic ‘Search results in columns’ is closed to new replies.