Okay
  Public Ticket #3362597
Related Events
Closed

Comments

  •  3
    Karina started the conversation

    How do the related events work? I sometimes get related events, but it doesn't seem to pick events from the same category. Sometimes one event is linkt to another, but that one isn't linked back. Can I choose which Events should be linked or otherwise deactivate that function?

  •  877
    Zhivko replied

    Hi,

    I am attaching you an example on how you can modify the related events logic via a hook.

    This example searches for events that belong to the same categories as the current event, within a date range that spans one month before and one month after the event's date.

    ---

    If you want to disable related events section you can add this hook in yout theme or child-theme functions.php file:

    add_action('stec_get_custom_related', '__return_false');



    Attached files:  custom related hook.zip


    Stachethemes Developer