Events+ Widget - Goes To Wrong Page

On my page at https://christiangays.com/events-list/ I have a widget called Upcoming Events By Month. There are two issues.

1. When "Browse" is clicked it goes to /events/ (archive page), but I am not using that page. I am using /events-list/ page. Can you tell me please what needs to be changed to redirect to the correct page.

2. The month showing is January, and yet it is now March. Can the default be made to show the current month please.

Many thanks!
Support Access is granted.

(Note: I thought I posted the first part of this before, but I can't find a ticket for it. Please delete the first one if/when it shows up since it doesn't contain the second point.)

  • Dimitris

    Hey there Mary,

    hope you're doing good today! :slight_smile:

    I was able to find some server details that you've sent already and I narrowed this down eventually.

    1. This is happening because the custom widget is using the slug set in Events -> Settings -> Plugin Settings

    To surpass this, edit
    /events-and-bookings/lib/widgets/EAB_Month_Navigation.php
    file and in line #111
    replace
    url = '<?php echo home_url($eab->_data->get_option('slug')) . '/'; ?>' + year + '/' + month;
    with
    url = '<?php echo home_url() . '\/events-listing\/'; ?>' + year + '/' + month;
    Keep in mind that we hard-code the slug there.

    2. By default the first option is shown in a dropdown list. The easier way to surpass this would be to add an empty option in both of these controls (year and month) as shown below:

    (/events-and-bookings/lib/widgets/EAB_Month_Navigation.php)

    Warm regards,
    Dimitris

  • Dimitris

    Hey there Mary,

    hope you're doing good today! :slight_smile:

    It seems that I had messed up my test install somehow, I'm sorry for the misunderstanding here, but seems that the month archive view of custom event type should be binded to the root slug, set under Events -> Settings -> Plugin Settings.

    A workaround here could be to set a similar slug, I already set this as "events-listing" and reverted the change I mentioned before, so custom month widget produces a redirect like in "/events-listing/2017/3/".

    In order to preserve the same styles as in "/events-list/" page, you should apply the same CSS rules under the body.post-type-archive-incsub_event or .wpmudevevents-list class.

    Warm regards,
    Dimitris

  • Mary

    Sorry Dimitris but I'm confused. It was suggested that I don't use the archive page because I can't put a sidebar on it. Therefore I should create a "page" for the archive, which I did.

    So now it looks like you're saying I should go back to using the original archive page? Is that what you're saying?

    I don't want to use the original archive page because I can't have my sidebar. I just need the widget that shows year and month to go to the new /events-list/ page instead of the /events/ page.

    How do I do that please.

  • Dimitris

    Hey there Mary,

    hope you're doing good today! :slight_smile:

    I just went ahead and made some changes in the actual markup of the template file that Predrag shared in his previous reply, along with some CSS rules (I also duplicated some CSS rules used in shortcode view /events-list/).

    Now a monthly archive page (/events-listing/2017/3/) is pretty close to the main Events List page (/events-list/). Let me know if further assistance is required!

    Take care,
    Dimitris