Forum Replies Created
-
AuthorPosts
-
Yans
ParticipantHi,
Thank you very much for the quick reply!
The code worked (had to change “10,2” to “10,3”).
This ticket can be closed.
Yans
ParticipantHi Ernest and thanks for your reply. The client wanted one thing for one CPT and a “sticky” feature for another CPT, for which I used the Priority Group configuration.
Thanks again and you can close this issue.
Yans
ParticipantSorry, please put this ticket on hold, there might be an additional request from the client that will cause this to be implements without ASP.
I will let you know.
Thanks
Yans
ParticipantThanks!
I confirm the problem is fixed.
You can close this ticket.
Yans
ParticipantYou cannot access this content.
Yans
ParticipantYou cannot access this content.
Yans
ParticipantYou cannot access this content.
December 12, 2024 at 8:34 am in reply to: Fetching a URL parameter from within an asp_query_args callback function #52254Yans
ParticipantThanks Ernest.
Everything is working fine.
You can close this ticket.
December 11, 2024 at 11:44 am in reply to: Fetching a URL parameter from within an asp_query_args callback function #52239Yans
ParticipantThanks! This works, only thing I had to change was:
$event_mode = $_GET['event_mode'] ?? <strong>''</strong>;Otherwise it would always be set to ‘past’.
The last thing I need is ordering. I saw in the documentation:
$args['post_primary_order'] = "relevance DESC";But there is no mention for ordering by custom field. I would like to order descending by custom field
evcal_srow.I did the following and it looks like it’s working, but wanted to confirm with you this is the correct code:
$args['post_primary_order'] = "customfp DESC"; $args['orderby_primary_cf'] = "evcal_srow";December 9, 2024 at 9:21 am in reply to: Using date_format on custom date field returns “now” #52190Yans
ParticipantHi Ernest,
Thanks for the code, it works!
This ticket can be closed.
December 6, 2024 at 1:45 pm in reply to: Using date_format on custom date field returns “now” #52176Yans
ParticipantUnfortunately I cannot give you access as the client is a European Agency and contractually I am not allowed to.
Is there another way to format that custom field? maybe via a function?
December 5, 2024 at 4:06 pm in reply to: Using date_format on custom date field returns “now” #52165Yans
ParticipantThanks for replying.
The filtering code is now working well and only for the specific ASP instance. Thanks.
The date formatting problem is still there and quite strange because it gives strange values, as you can see from the attached screenshot.
Using just {evcal_srow} displays the correct UNIX timestamp.
Using {evcal_srow date_format=’F j, Y’} (I switched ” with ‘) gives today’s date for all the different timestamps. For some results it gives strange year values like 6800, 7600.
December 5, 2024 at 3:35 pm in reply to: Using date_format on custom date field returns “now” #52163Yans
ParticipantSorry to spam with messages.
The code above does work, there was a problem unrelated to ASP.
But, this code affects all my ASP instances. How can I target specific ASP instance?
Thanks
December 5, 2024 at 2:57 pm in reply to: Using date_format on custom date field returns “now” #52161Yans
ParticipantAnother question.
I am trying to limit the search results to upcoming events by adding a filter to limit results with evcal_srow greater or equal to now.
I adapted the code in the documentation:
add_filter('asp_query_args', 'asp_upcoming_events_filter', 10, 1); function asp_upcoming_events_filter( $args ) { $args['post_meta_filter'][] = array( 'key' => 'evcal_srow', 'value' => time(), 'operator' => '>=', 'allow_missing' => false ); return $args; }But it doesn’t have any effect.
How can I make sure the filter targets the specific search ID?Thanks!
Yans
ParticipantHi Ernest,
Thanks for the prompt replay.
The only problem I had with that solution, it is targeting a specific search instance, and I need CSS for all 4 search instances I have.
So, I used something called attribute selectors.
Instead of:
div#ajaxsearchpro4_1 .probox .proinput input.orig, div#ajaxsearchpro4_2 .probox .proinput input.orig { padding: 12px !important; }I used:
div[id*="ajaxsearchpro"].probox .proinput input.orig { padding: 12px !important; }It works also with classes:
div[class*="asp_m_"].asp_m.asp_main_container .probox .proinput input.orig { color: #1A213D !important; font-size: 1rem !important; }It does not work 100% of the time, I had one case that I had to use specific ID selector.
Hopefully, this will help someone.
Ernest, this ticket can be closed.
Best,
Yan
-
AuthorPosts