Forums › Forums › Search & Filter Pro › Aligning Post Title and featured image in results
Tagged: featured image, results
- This topic has 17 replies, 2 voices, and was last updated 6 years, 4 months ago by Anonymous.
-
Anonymous(Private) September 3, 2018 at 5:28 pm #187095
Hey, i am trying to make S&F show the results like this:
featured image from Post , post title
i would like to have them in one line.
This is my Code so far:
<?php
/**
* Search & Filter Pro
*
* Sample Results Template
*
* @package Search_Filter
* @author Ross Morsali
* @link https://searchandfilter.com
* @copyright 2018 Search & Filter
*
* Note: these templates are not full page templates, rather
* just an encaspulation of the your results loop which should
* be inserted in to other pages by using a shortcode – think
* of it as a template part
*
* This template is an absolute base example showing you what
* you can do, for more customisation see the WordPress docs
* and using template tags –
*
* http://codex.wordpress.org/Template_Tags
*
*/if ( $query->have_posts() )
{
?><?php echo $query->found_posts; ?> Ergebnisse gefunden<br />
<div class=”pagination”>
<div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div><br />
<div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></div>
<?php
/* example code for using the wp_pagenavi plugin */
if (function_exists(‘wp_pagenavi’))
{
echo “<br />”;
wp_pagenavi( array( ‘query’ => $query ) );
}
?>
</div><?php
while ($query->have_posts())
{
$query->the_post();?>
<div>
<h2>“><?php the_title(); ?></h2><br /><?php
if ( has_post_thumbnail() ) {
echo ‘<p>’;
the_post_thumbnail(“small”);
echo ‘</p>’;
}
?></div>
<hr />
<?php
}
?><div class=”pagination”>
<div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div>
<div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></div>
<?php
/* example code for using the wp_pagenavi plugin */
if (function_exists(‘wp_pagenavi’))
{
echo “<br />”;
wp_pagenavi( array( ‘query’ => $query ) );
}
?>
</div>
<?php
}
else
{
echo “No Results Found”;
}
?>##################################################################################
Thanks for your help
regards
LeanderAnonymous(Private) September 4, 2018 at 5:55 pm #187280This is the site i am working on.
https://leist.osteopathiefortbildung.de/index.php/kurse/I am using BeTheme and Visual Composer / WP Bakery Page Builder. There is an option called Post Grid, that i used on the “Dozenten” Page to Display Posts. Its not the same but similar.
This has Posts shown in the lower area. Its BeTheme.
https://themes.muffingroup.com/be/press/I think columns would work. Two. Image left, Title / Link right.
hope this is Helpful.
Thanks!
Anonymous(Private) September 6, 2018 at 4:22 pm #187495Perfect Solution! Thanks a lot.
There is one problem though. The submit button does not work. I tried to enable auto submit, even tough it changes the url the results do not get loaded according to the new filters. This happens only if i reload the page manually.
Can this be fixed somehow?
Anonymous(Private) September 6, 2018 at 5:13 pm #187522https://leist.osteopathiefortbildung.de/index.php/kurse/
Just use one of the dropdown filters.
it should automatically load the results or load them after clicking the Button.
But it doesn’t. Thats the problem. -
AuthorPosts