Support » Plugin: The Events Calendar Category Colors » Moving Legend Above tribe-events-sub-nav

  • Very helpful plugin, thank you.

    I’m trying to move the legend above tribe-events-sub-nav (the month navigation) by following the instructions here,

    [ https://github.com/afragen/the-events-calendar-category-colors/wiki/Changing-the-Legend-Position ]

    … adding the snippet via the code snippets plugin. The same plugin has worked fine to add the legend explanation text (also on github) so I think I must be missing something.

    I even tried using the code exactly as shown on github [ teccc_reposition_legend(‘tribe_events_before_footer’); ] but each time the site crashes and I have to delete that snippet from the DB to get back in.

    Could you please tell me what I need to do to put the legend above the month navigation?

    Thanks for your help.

    Rick

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Andy Fragen

    (@afragen)

    Hey Rick,

    It looks like you didn’t follow the link at the bottom of that page. https://github.com/afragen/the-events-calendar-category-colors/wiki/Customizing-Category-Colors-Plugin

    It contains info on how to avoid those errors.

    Hi Andy,

    Being the Legend Explanation worked without the code block, I thought the legend location would also.

    Now I’ve just tried the following, with the same results;

    if ( class_exists( ‘\\Fragen\\Category_Colors\\Main’ ) ) {

    teccc_reposition_legend(‘tribe_events_before_footer’);

    }

    I believe I’ve copied all of this correctly from your website. Could you please check it?

    Also, do you know of a hook that will put the legend above the month navigation?

    Thanks,

    Rick

    Plugin Author Andy Fragen

    (@afragen)

    That looks correct and should place the legend below the grid. The normal position is above the grid. Where is it that you want the legend to appear?

    The normal position is as high as it goes. I use The Events Calendar elements you position the legend and it will only go in certain places.

    Plugin Author Andy Fragen

    (@afragen)

    Rick, the legend explanation is a filter call. If any of the dependent code is not present there is no effect. Changing the legend location is a function call. If that function is not present, hasn’t loaded, there will be a PHP fatal error for an undefined function.

    Plugin Author Andy Fragen

    (@afragen)

    When you say, I got the same results, I’m not sure what you mean. Images would be helpful.

    Hi Andy,

    By same results I mean, the site crashes and I have to delete that snippet from the DB to get back in. Image would just be a white screen; with a 504 error if I remember correctly, and/or something saying the site wasn’t working. Remove the snippet = everything back to normal.

    The code I posted (to put legend below grid) was to try and get a functioning result with the exact code from your site, before modifying it to place the legend above the month navigation (where previous and next months are selected).

    If the default position is the highest possible, then I guess having it above the month navigation can’t be done. That’s too bad. It seems that the month selection being directly adjacent to the month grid (with legend above both) would be the most intuitive location. With the legend in between the two, it’s easy for a viewer to overlook the month nav.

    • This reply was modified 2 months, 2 weeks ago by UN_Rick.

    Could the legend be placed using hooks outside The Events Calendar elements?

    Plugin Author Andy Fragen

    (@afragen)

    Rick, the simplest thing would be to fork or use the Category Colors Options plugin.

    There is no ability to insert the legend outside of The Events Calendar.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.