Forum Replies Created
-
AuthorPosts
-
trw226
ParticipantHi Ernest,
Back in June you indicated that you were adding the “re-ranking results rather than filtering results”/”always show a minimum number of results” feature to the Ajax Search Pro planned feature tracker and that it might be included in an upcoming release. (See thread above.) I realize that you are working on many features but is that still on the development horizon?
Best regards,
Tomtrw226
ParticipantHi Ernest,
The code you suggested does not work as expected. I think the <div> you included containing the shortcode interferes with the <div> containing the image, and renders the social media buttons into a row below the image. Because I am not sure if my initial inquiry was clear, I am including pictures highlighting what I am trying to do.
Your consideration is greatly appreciated.
Thanks,
Tomtrw226
ParticipantErnest,
Is there a way to add the social media button shortcodes to the end of excerpt text, instead of underneath the each entire search result? In a vertical layout, the picture typically appears on the left, and the title and excerpt text on the right. I would like to center the social media buttons under the excerpt text, but it is not obvious how to select just that portion of the search result object and add the shortcode to it.
Thanks,
TomJuly 19, 2016 at 7:52 pm in reply to: Mobile-friendly: making featured images clickable (but not entire result area)? #9557trw226
ParticipantI managed to fix this. Not sure if this is “optimal” for others, and I think it only works with static images (not background images) but posted here in case it is useful for others. Perhaps an “official” version will come out later.
In the isotopic.php file (which should be put in your wp-content/themes/your-theme-name/asp/isotopic.php folder)
you want to replace these lines:
[html]<div class=’asp_item_img’ imgsrc=’<?php echo $r->image; ?>’ style="background-image: url(‘<?php echo $r->image; ?>’);">
<a>link; ?>’<?php echo ($s_options[‘results_click_blank’])?" target=’_blank’":""; ?>></a>
</div> [/html]with these lines:
[html]<div class=’asp_item_img’>
<a>link; ?>’<?php echo ($s_options[‘results_click_blank’])?" target=’_blank’":""; ?>><img />image; ?>’ /></a>
</div>[/html]trw226
ParticipantThis worked great! Thanks
trw226
ParticipantThanks, Ernest!
In case it helps, here is one thought on how to potentially implement this. (This is offered very humbly as a brainstorm and you should probably talk to a search expert.)
I think right now when you create an index table, only the posts with a keyword match are captured in the results for that keyword. (This is a first-order result.) However, if at least one first-order result is found, you can use the keywords in the found result(s) to look for matches in the remaining unindexed posts. (These are second-order results.) The algorithm should be recursive until all posts are indexed in a specific order for each keyword.
Example: If I search for lion, and there is only one post for lion, that post is added to the top of the lion keyword index. But if the post for lion also contains the keywords “cat” and “animal”, then the post for tiger, which also contains the words “cat” and “animal” and “zoo”, should be added second to the lion keyword index. If there is a post for a bear, which only has the word “animal” in it, that could be added third to the lion keyword index. Then search the remaining posts for “zoo” (a third-order search), etc.
This would be useful because if I only have one or two post results, the algorithm will highly rank those other posts which have similar tagging to the original results.
If, after that process, some posts remain unindexed, they can be added to the table by default (such as by most recent post), but every post should have a ranking for every keyword in the index. If a user entered a word that is not found in any post, then I think you should just say “no results found” but leave the default ranked results in place.
Separately, (and this is probably a separate feature and way beyond this scope here,) it would be awesome if someday Ajax Search Pro also let you weight the ranking of results based on what frequency of search, and frequency of click-through, rather than just by post date. When people come to my site, I would like to also show some of the most searched-for items in the default result, or the most clicked-on items over the last 3 months, as well as some of the more recent items.
Highest regards,
Tom -
AuthorPosts