Forum Replies Created
-
AuthorPosts
-
March 2, 2023 at 10:05 am in reply to: Results disappearing when I click outside of the results window #41590
kyrian
ParticipantI already left stellar reviews in both places 🙂
March 1, 2023 at 5:51 pm in reply to: Results disappearing when I click outside of the results window #41585kyrian
ParticipantPerfect, thanks!
February 2, 2023 at 6:05 pm in reply to: How to only show the default wp post text in results #41205kyrian
ParticipantI was able to solve this by getting rid of {__content maxlength=130}
and using {descriptionfield} instead, but grabbing the text from the post content instead than from the excerpt.I still think {__content} has issues with html tags though.
January 29, 2023 at 12:31 pm in reply to: The date in printed in english, how to show it in the site language? #41145kyrian
Participantperfect, thank you 🙂
January 29, 2023 at 12:27 pm in reply to: The date in printed in english, how to show it in the site language? #41142kyrian
ParticipantThere is a little issue with the code you provided.
When I sue it, the date is being showed also for taxonomies (tags and categories) listed in search results.
see: https://www.screencast.com/t/UJnJmsbKC4Flive site: https://accademiainfinita.it/2/contenuti/
How can I modify the code, so the date shows only for posts/pages?
Thanks
January 29, 2023 at 12:23 pm in reply to: The date in printed in english, how to show it in the site language? #41140kyrian
ParticipantThank you so much for providing the custom code!
I was able to solve the language issue as well.
Your support is legendary 🙂January 28, 2023 at 12:11 pm in reply to: The date in printed in english, how to show it in the site language? #41134kyrian
ParticipantApart from the language issue,
I’d like to convert the dates to human-readable formatI have used this code to make this change site wide, it works in all posts and pages but not for the search results
// Convert all dates to human-readable format function custom_time_ago() { return human_time_diff(get_the_time('U'), current_time('timestamp')) . ' fa'; } add_filter('the_time', 'custom_time_ago'); add_filter('get_the_date', 'custom_time_ago'); add_filter('the_modified_time', 'custom_time_ago');kyrian
Participantnow it’s clear, thanks
kyrian
ParticipantSo after customizing this code in placing it in function.php, then I create a custom search form. But how do I tell this form to use the provided code to only search in the same taxonomy as the visited page?
This last step is not clear to me, sorry.kyrian
ParticipantThanks a lot!
kyrian
ParticipantThat must be the issue then, I just created the field and it’s not used yet.
Thank youJanuary 25, 2023 at 11:36 am in reply to: is there any way to hide the results' scrollbar for desktop view, but make it vi #41088kyrian
ParticipantI have already left a stellar review on codecanyon, will post it on wp too
January 25, 2023 at 11:11 am in reply to: is there any way to hide the results' scrollbar for desktop view, but make it vi #41086kyrian
ParticipantThank you!
I didin0t know this propertyI had to wrap the title with a span to make it work, but the result is perfect.
<span>{titlefield}</span>
#full-page-search-results .asp_content h3 a span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }January 24, 2023 at 4:23 pm in reply to: is there any way to hide the results' scrollbar for desktop view, but make it vi #41082kyrian
ParticipantThanks, I guess it’s a just a cache issue then!
Since I am here…
I want to run the below code on the search results to truncate the characters depending on the user screen size.
I have inserted the code via Oxygen above the results shortcode and it works so and so… it does truncate the texts but with a certain delay.
See https://accademiainfinita.it/2/meditazioni-guidate/Do you think the only way to make this work is to put the code directly in the plugin file?
I know I am asking questions that are beyond the scope of support btw, just say the word and I’ll shut up 🙂
window.addEventListener("resize", truncateCharacters); const query1 = window.matchMedia("(min-width: 480px) and (max-width: 991px)"); const query2 = window.matchMedia("(max-width: 479px)"); function truncateCharacters() { if (query1.matches) { const titles = document.querySelectorAll('.asp_res_url , .asp_res_text'); for(let title of titles){ if (title.innerText.length > 100) { title.innerText = title.innerText.slice(0,100) + "..."; } } } else if (query2.matches) { const titles = document.querySelectorAll('.asp_res_url , .asp_res_text'); for(let title of titles){ if (title.innerText.length > 50) { title.innerText = title.innerText.slice(0,50) + "..."; } } } } truncateCharacters(); query1.addListener(truncateCharacters); query2.addListener(truncateCharacters);January 24, 2023 at 4:07 pm in reply to: is there any way to hide the results' scrollbar for desktop view, but make it vi #41080kyrian
ParticipantThanks you,
yes it works but what I am trying to accomplish is having different settings for desktop vs mobileI want no maximum height for desktop and 80vh for tablet and mobile
I tried like this https://tinyurl.com/2gn9f9dy
but it doesn’t set the scrollbar for mobile unfortunately
-
AuthorPosts