Issue with result group by meta key

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Issue with result group by meta key

This topic contains 55 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 11 months ago.

Viewing 15 posts - 1 through 15 (of 56 total)
  • Author
    Posts
  • #21225
    davidalexander
    davidalexander
    Participant

    Hi,
    I am using the ajax search pro with the wp events manager plugin. I have implemented this and the search working fine to me for events.
    But in events manger there there single events and recurring events. Recurring events is displaying repeatedly (eg: if there is an event occurrs in each week in year. the search result shows a 100+ same events).
    I need to show only one latest event. Ho can I mange that.
    Already you are mentioned that, the ajax search pro is compatible with events in manager in the live demo.
    It’s very urgent to me.
    Also order by event start date is not working. I have set result ordering by custom field and its not working fine. Can you please check this asap.

    #21228
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps me lot. Can you please check the back-end access credentials? I cannot seem to be able to log-in to check the configuration. The FTP seems to be working okay.

    Some custom code might be needed to filter out the recurring events, as those are separate post types, with distinctive IDs, thus the plugin cannot group them as one. I will check if there is any other way of removing them from the results list. Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21229
    davidalexander
    davidalexander
    Participant
    You cannot access this content.
    #21230
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    To solve the date ordering issue, make sure that the field type is set to ‘string’, and that should do the trick for that: https://i.imgur.com/BXNx4tQ.png

    For the duplicate entries, I have placed a custom code to the functions.php file in your child theme directory via FTP, so hopefully duplicates should not be present now.

    I hope this helps!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21274
    davidalexander
    davidalexander
    Participant

    Hi,
    Thank you so much. It’s working perfectly as I needed. Thank you.

    #21275
    davidalexander
    davidalexander
    Participant

    Hi,
    Also I have one another issue. How can we manage an event which occurs 10 – 11 am and 2-3 pm in a same day. Is we needed to create it as 2 events or is there any way to manage same event in multiple times a day.

    #21281
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I think that might require 2 separate events, as the date needs to be exactly set.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21996
    davidalexander
    davidalexander
    Participant

    Hi,
    I need to customise the search result. I need to display all events on page load by default. search result will show only if we change the search option.
    See this example: https://www.edinburghmuseums.org.uk/whats-on

    #21999
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I think this is what you are looking for: https://documentation.ajaxsearchpro.com/layout-settings/auto-populate-automatic-search-results-on-initial-page-load
    You can even try this configuration, if you need the results to follow the default order: https://i.imgur.com/cmT0NhP.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #22004
    davidalexander
    davidalexander
    Participant

    Hi,
    We are using events manger plugin with this. We need all the events initially on page load without any date filtration. Only need to customise the result when we change the date , category or something like that. Now, on page load events showing based on current date or any relevant date we have set as default in back-end. But we need all events under particular meta field and not in any date range.

    #22009
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    The auto populate respects the filters, and unfortuantely that is not possible to change, it is a hard-coded feature. The best way to resolve that is to set the filters to the desired defaults.
    “But we need all events under particular meta field and not in any date range” – I’m not sure what exactly do you mean by this. There is a possibility to set a ‘hidden’ type of custom field filter, if you want to display events only that match a certain meta field value.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #22012
    davidalexander
    davidalexander
    Participant

    What can I do to get the events on all dates. I am saying that, I need to filter the events by event category by default. On page load, we need to show all events under a specific category irrespective of date. But there should be a filtering option on the search settings to filter the events by start date. But we do not need this date filtering on page load.
    Can you customise the code.

    #22017
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I managed to find a possible solution, but I had to make direct changes to the plugin files. I will include these changes in the upcoming release, please do not re-istall or update the plugin until the 4.15.1 release.

    I have also added this custom code to the functions.php file in the child theme directory:

    add_filter('asp_query_args', 'asp_reset_date_filter');
    function asp_reset_date_filter($args) {
      if ( isset($_POST['autop']) ) {
        foreach ( $args['post_meta_filter'] as $k => $v ) {
          if ( $v['key'] == '_event_start' ) {
            unset($args['post_meta_filter'][$k]);
          }
        }
      }
      return $args;
    }

    This negates the filter, when the page is loaded with auto populate. Please keep this custom code there.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #22019
    davidalexander
    davidalexander
    Participant

    Thank you for your work. But, now now it showing only the events in 01-01-2019. We need all the events under the category with no any specific date.
    can you please check the page https://lmg.alexandermarketing.co.uk/whats-on/
    the site is in maintenance mode. Please login to view
    User: s-admin
    Pwd: Z@%fdM10*v9sT0v*GvlVE1Mx

    Also, if we select a date like 10/05/1019, we will get only the events which event start date equal to the date. But we need to show the events, which starts on 05/05/2019 and ends in 12/10/2019. Because the event is in between 05/05/2019 and 12/10/2019.

    #22021
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Those are not visible, because it reaches the results limit. You can increase that here: https://i.imgur.com/SbxN56P.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.