• Resolved Scott Trsar

    (@scotttrsar)


    This is either a bug, an oversight or this isn’t documented very clearly… I’m assuming the cause is because certain shortcodes other than [tribe_events] are reusing widget code.

    Referring to the documentation on this article

    —–

    • TEC v5.12.4
    • TEC PRO v5.12.0

    If you are using the shortcode [tribe_event_list] the shortcode context conditional does not work in filter tribe_events_views_v2_view_repository_args.

    if($context->is('shortcode')){
      // Is shortcode... @NOTE: doesn't work with shortcode [tribe_events_list] in main page content
    }

    Instead what worked is checking for the context of a widget (even though it’s a shortcode).

    if($context->is('widget')){
      // Is widget... @NOTE: works when using shortcode [tribe_events_list] for some reason
    }

    Is this intentional or am I mis-understanding the documentation?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Context conditional bug when using shortcode [tribe_events_list]’ is closed to new replies.