This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • in reply to: Compare two custom fields before displaying them #55446
    YansYans
    Participant

    Hi,

    Thank you very much for the quick reply!

    The code worked (had to change “10,2” to “10,3”).

    This ticket can be closed.

    in reply to: Sticky result on top #54532
    YansYans
    Participant

    Hi 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.

    in reply to: Sticky result on top #54478
    YansYans
    Participant

    Sorry, 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

    in reply to: Ordering result by custom field #53682
    YansYans
    Participant

    Thanks!

    I confirm the problem is fixed.

    You can close this ticket.

    in reply to: All filters have the same values #53634
    YansYans
    Participant

    You cannot access this content.

    in reply to: All filters have the same values #53621
    YansYans
    Participant

    You cannot access this content.

    in reply to: All filters have the same values #53619
    YansYans
    Participant

    You cannot access this content.

    YansYans
    Participant

    Thanks Ernest.

    Everything is working fine.

    You can close this ticket.

    YansYans
    Participant

    Thanks! 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";
    in reply to: Using date_format on custom date field returns “now” #52190
    YansYans
    Participant

    Hi Ernest,

    Thanks for the code, it works!

    This ticket can be closed.

    in reply to: Using date_format on custom date field returns “now” #52176
    YansYans
    Participant

    Unfortunately 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?

    in reply to: Using date_format on custom date field returns “now” #52165
    YansYans
    Participant

    Thanks 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.

    in reply to: Using date_format on custom date field returns “now” #52163
    YansYans
    Participant

    Sorry 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

    in reply to: Using date_format on custom date field returns “now” #52161
    YansYans
    Participant

    Another 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!

    in reply to: Overriding Ajax Search Pro CSS #49268
    YansYans
    Participant

    Hi 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

Viewing 15 posts - 1 through 15 (of 21 total)