Forums › Forums › Search & Filter Pro › Archive style result showing – not workin
Tagged: archive template, Jupiter 5
- This topic has 10 replies, 2 voices, and was last updated 8 years, 1 month ago by Trevor.
-
Anonymous(Private) September 25, 2016 at 11:19 am #59894
Hi,
Everything pretty good with the plugin but the archive way of showing results is not workin.. When i fill my data and press the Submit button it says “1 result found” but below that all the posts are listed, probably the problem is caused by the queries so i tried to remove them from the archive.php file but as i can see my theme (jupiter 5) is using wp-archive.php and it`s too complicated for me as i am a designer not a php developer… So could you please help me with that issue? I would be very grateful 🙂Here is the website: http://magna-estate.com/
I have the search form in couple of placec all over the website : http://magna-estate.com/prodaja/Trevor(Private) September 26, 2016 at 9:07 am #59994Your site is very slow and now appears to have crashed?
On the form General Settings tab for both forms, enable Auto Submit (both options).
On the form on the Home page the template given is archives.php, but on the form on the prodaja page the template given is arch.php?
also on this form, the Results Container is et to
#main#
but it may need to be.mk-in-viewport
I am unable to set these or test though, as the site is down.
Anonymous(Private) September 26, 2016 at 12:10 pm #60048Hi 🙂
The site is not down.. it just has two versions – russian and english one (the english one is still not developed) i am working on the russian still (so u have to check the russian version) So.. About the search form on the home page – i want it to display the results not in the home page but in a result page so when i enable the Auto Submit option when I choose smth from the first drop down field it automatically sends me to the result page without giving me a chance to fill the rest of the fields in the search form?
That`s why I have disabled it.About the second form – “prodaja” it`s placed on the top of a a page where all the properties are listed and i want the results to display in the same page (below the search form) i want to use the archive.php .
The search engine is working.. it
s saying "You have one result found" but it
s displaying all the posts that are in the archive.php – that`s the problem. 🙂Trevor(Private) September 26, 2016 at 1:21 pm #60070I am struggling to understand what you are trying to do, which is probably me, not you.
I look at search form #1464 (Prodaja). It is set to go to a different page with the page name
http://magna-estate.com/?sfid=1464
. It is not set to stay on the same page. It is set to use a template file calledarch.php
. When I choosekategoriq=вторичная
I expect 1 result. I do not see this, there are many results. The template does not appear to have the search form, and I cannot see where it says ‘1 result found’ as you say in your post. I am confused.Anonymous(Private) September 26, 2016 at 2:34 pm #60324okay I made it easier for u (ru version – hompeage (search form id = 853) (maybe you are getting confused because of the languge) so I removed all the fields but “Location” (the first one) for testing. Also i`ve turned the Auto count on so you can see that in the first option of the field “Бургас” there is one result (1) . After pressing the submit button now you can see “SEARCH
1 Search Results for: “”” and below all the posts are listed, not just the one we are looking for.
Trevor(Private) September 26, 2016 at 2:50 pm #60327The ‘1 Search Results for …’ shows that is using the search.php template and not the archives one, but this is because in the advanced settings you have told it to do this.
I think your theme is hijacking the query when using archives. Did you try using the shortcode method (the results may look bad, but that can be fixed)?
Anonymous(Private) September 27, 2016 at 8:39 pm #60671I`ve been tryin make that thing with the archive page workin but I did not succeeded so I have no other choice but to use the shortcode. Now I am wondering how to impelement that .php code which is how i want my single result to look like :
<?php global $post, $mk_options; if ($view_params['layout'] == 'full') { $image_width = $mk_options['grid_width'] – 40; } else { $image_width = (($mk_options['content_width'] / 100) * $mk_options['grid_width']) – 40; } $post_type = get_post_meta($post->ID, '_single_post_type', true); $post_type = !empty($post_type) ? $post_type : 'image'; ?> <article id="<?php the_ID(); ?>" class="mk-blog-modern-item mk-isotop-item <?php echo $post_type; ?>-post-type"> <?php $media_atts = array( 'image_size' => $view_params['image_size'], 'image_width' => $image_width, 'image_height' => $view_params['grid_image_height'], 'post_type' => $post_type, //'image_quality' => $view_params['image_quality'] ); echo mk_get_shortcode_view('mk_blog', 'components/featured-media', true, $media_atts); if ($view_params['comments_share'] != 'false') { ?> <div class="blog-modern-social-section"> <?php echo mk_get_shortcode_view('mk_blog', 'components/social-share', true); echo mk_get_shortcode_view('mk_blog', 'components/comments', true, ['post_type' => $post_type]); echo mk_get_shortcode_view('mk_blog', 'components/love-this', true); ?> </div> <?php } ?> <div class="mk-blog-meta"> <?php echo mk_get_shortcode_view('mk_blog', 'components/meta', true); echo mk_get_shortcode_view('mk_blog', 'components/title', true); echo mk_get_shortcode_view('mk_blog', 'components/excerpt', true, ['excerpt_length' => $view_params['excerpt_length'], 'full_content' => $view_params['full_content']]); ?> <?php echo do_shortcode( '[mk_button dimension="flat" corner_style="rounded" bg_color="'.$mk_options['skin_color'].'" btn_hover_bg="'.hexDarker($mk_options['skin_color'], 30).'" text_color="light" btn_hover_txt_color="#ffffff" size="medium" target="_self" align="none" url="'.get_permalink().'"]'.__('READ MORE', 'mk_framework').'[/mk_button]' ); ?> <!– "><?php _e('READ MORE', 'mk_framework'); ?> –> <div class="clearboth"></div> </div> <div class="clearboth"></div> </article>
I guess i have to put it in your results.php file… ?
-
AuthorPosts