WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Acessing custom Event Attributes in template (10 posts)

  1. jumpinglemon
    Member
    Posted 1 year ago #

    Hi,

    We have been using the events manager plugin on our site for quite some time now and its great. (Bought the pro version!)

    I want to hijack the link on the calendar view to go to a custom page (not event page) the url to the custom page will be defined in a custom Event Attribute #_ATT{CUSTOMURL}

    Can you let me know how/where to access it to override the link on the calendar.

    Thanks

    http://wordpress.org/extend/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 1 year ago #

    are you using default calendar? if yes, have you tried Settings > Formatting > Calendar > Event format and then try something like

    <a href="#_ATT{CUSTOMURL}">#_EVENTNAME</a>
  3. jumpinglemon
    Member
    Posted 1 year ago #

    Thats great thanks! is there any way to do the same thing on FullCalendar?

  4. angelo
    NetWebLogic Support
    Posted 1 year ago #

    yes, you need custom coding for this; here is a snippet which can give you some idea - http://wordpress.org/support/topic/disable-link-just-mouse-over?replies=2

  5. jumpinglemon
    Member
    Posted 1 year ago #

    Thanks. Can you tell me how to access the custom attributes from there?

    The $events[$key] array does not contain them?

  6. hristo5322
    Member
    Posted 1 year ago #

    I need somehow to use something like placeholders in template files. I tryed to use them directly in templates but without success. Any help?

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    at the moment you're going to have to iterate that array and recreate the EM_Event objects from the event_id key

    e.g. $EM_Event->output('#_ATT{...}');

    not an optimal solution speed-wise but there's no filter in between.

    I'll add a filter earlier on asap but there's some other improvements in there that need to happen before.

  8. hristo5322
    Member
    Posted 1 year ago #

    Marcus, probably this will work ..., but can you write me a bit of code that i have to place in the template file to iterate the array and recreate EM_Event objects from the event_id key, so I can use the method you mentioned

  9. angelo
    NetWebLogic Support
    Posted 1 year ago #

  10. hristo5322
    Member
    Posted 1 year ago #

    Hi @angelo_nwl
    That helps ... very useful topic ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic