-
AuthorSearch Results
-
December 4, 2017 at 2:34 pm #145467
In reply to: Stopping search results from appearing automatically
TrevorParticipantIf you are using the shortcode display results method, you will be using our results.php template file to display the results. See this post if that is the case (otherwise let me know which method you are using):
https://support.searchandfilter.com/forums/topic/force-selection/#post-87657
November 29, 2017 at 12:00 am #144448
AnonymousInactiveThanks for this! So I’m using the new results.php under search-filter directory that I created. There are php snippets already in there.
<?php the_category(); ?>
<?php the_date(); ?>
<?php the_permalink(); ?>”>
<?php the_excerpt(); ?>
<?php the_permalink(); ?>”>
<?php the_title(); ?>Where are these defined? How do I see all of them associated with my custom post type?
I was trying to move <?php the_category(); ?> to my custom HTML but the snippet is bringing back HTML.
- and
- tags. All I want is the name of the category (text only). How can I change that?
How do I get the category permalink? I tried <?php the_category_permalink(); ?> <?php the_categorypermalink(); ?> these don’t work. There has to be a snippet for it?
As I was testing I thought about how I can bring back the author name. So I tried <?php the_author(); ?> . It worked! Is there a way to see ALL snippets associated with my custom post type Game Review?
https://www.vrfitnessinsider.com/reviews/
Here is a post
https://www.vrfitnessinsider.com/review/game-review-testing-4/Thank you for any help you can give!
November 28, 2017 at 7:35 pm #144383
AnonymousInactiveThank you for your support! I have followed the directions and have created a new directory and am modifying the new results.php. Is there a way to find all of the php snippets that are available on a page? Example: I created a custom field called “Developer” and want to display that on the search results. How do I find the php snippet for that or anything else that is exposed on the post type?
November 28, 2017 at 5:24 pm #144334
TrevorParticipantThe style of the results depends on the Display method you use (as you say, you are using the Shortcode one right now). You would need to cutomise the results.php file, using php snippets from the WordPress Codex and other resources. Start here though:
There is, for example, a free addon for Search & Filter pro for Visual Composer/Page Builder, which means you can use their Post grid element and then use their tools to style it. See this post:
https://support.searchandfilter.com/forums/topic/can-we-change-template-desing/#post-136727
November 28, 2017 at 1:55 pm #144261In reply to: Custom template help in showing results
TrevorParticipantThe change I thought I had seen, I do not see. I have tried to get Search & Filter Pro working with your theme (which means using either As an Archive OR Post Type Archive) but neither will work, AND you cannot have more than one form using Post Type Archive. It causes all manner of problems.
As the theme is a custom built theme, we need to come at this from another approach, and use the Using a Shortcode display results method, as described here.
At first try it on a new page with the two required shortcodes just to see if it works. The follow the customisation guide in that article and edit the results.php file to output your grid instead. And work our way forwards.
November 27, 2017 at 5:11 pm #144119In reply to: Not working on taxonomy archive
AnonymousInactiveHi Trevor,
Switching to using the shortcode for results helped me greatly, it’s also working with Ajax. Is this the way to go when showing results on a taxonomy archive?
I’ve created a custom template for showing the results and this works good as well. The only problem I’ve got is that the template file needs to be called ‘results.php’ or ‘166.php’ (the ID of the form). It doesn’t seem to be possible to use the slug of the form for the template name, am I right about that? This gives me problems since the ID’s are different locally and on the server.
Also, I want to use the same form for all taxonomy archive pages (would be better not to need to create a form per term), but in that case I’ve got a problem with the ‘Results URL’ for the shortcode display. What do I need to insert there in this case? For now I’ve just disabled the ‘make searches bookmarkable option’.
November 27, 2017 at 8:25 am #144027In reply to: Do an ajax filtered query on loop
AnonymousInactiveHi Trevor, I use the results.php standard, but customized to show results like I want, and infinite scroll is working as expected, I don’t understand why should I use the other one, if it’s working?
November 24, 2017 at 8:41 am #143647In reply to: Do an ajax filtered query on loop
TrevorParticipantPossibly. When you made the results.php file above, from the Search & Filter Pro plugin templates folder, which file did you use? There is the standard results.php and one for infinite scroll (it must be (re)named results.php when used). The structure (HTML classes) are important.
November 23, 2017 at 8:56 am #143424In reply to: Show Media Library Images as a search result
TrevorParticipantIt will require some coding skills, but it is not hard. You first need to read this page in our documentation.
You can change the HTML, the style tags, delete stuff, add stuff in the copy of the results.php file.
I think this is the code you need (I am not sure though):
<?php echo wp_get_attachment_image( get_the_ID(), "thumb", "", "" );?>
This is from some code I wrote I while ago, here is a sub sample of the whole thing:
while ($query->have_posts()) { $query->the_post(); $gallery_link_url = get_post_meta( attachment_url_to_postid(wp_get_attachment_image_url( get_the_ID(), "full", false )), $key = '_gallery_link_url', $single = true); if ($gallery_link_url == "") $gallery_link_url = "#"; ?> <div> <h2><a href="<?php echo $gallery_link_url; ?>" target="_blank"><?php the_title(); ?></a></h2> <a href="<?php echo $gallery_link_url; ?>" target="_blank"> <?php echo '<span class="responsive">'; echo wp_get_attachment_image( get_the_ID(), "thumb", "", "" ); echo '</span>'; ?> </a> </div>
November 20, 2017 at 6:48 pm #142875In reply to: Do an ajax filtered query on loop
TrevorParticipantThere appear to be some HTML errors in there. This line has a closing
</p>
tag that doesn’t appear to have an opening tag:<div class="desc"><?php the_excerpt(); ?></p></div>
And just after the READ MORE line are two closing
</div>
tags, but seems to be unpaired. Maybe.You mention Infinite Scroll. Have you set this in your theme or in our plugin, as there is a different results.php file for this.
- tags. All I want is the name of the category (text only). How can I change that?
-
AuthorSearch Results