• Resolved hovig10

    (@hovig10)


    Hi Andy,

    Thanks for your plugin. Have been using it for a while on my other website.

    BUT I have a problem now with a new site I’m developing. All was working well but after I upgraded to Events Calendar PRO yesterday, I had the following problems:

    – After changing the category colors, all colors disappeared and the month-view buttons layout became bullet points instead

    – I tried various things, like changing page templates, deactivating/activating plugins…no success.

    – When I switched themes (twentysixteen), the colors came back. Then I activated my Theme X again and the colors were ok there also buy the month view layout still not working.

    – Every time I make a color change, the colors disappear again until I deactivate/activate the theme…but even then the layout is not working and the plugin seems ‘unstable’

    The url of the site page is: https://www.aisc.tiv1.com/events/

    Would really appreciate your help as the site has to go online soon and the calendar has to be functioning properly.

    Many thanks and let me know if you need more info and details.

    https://www.ads-software.com/plugins/the-events-calendar-category-colors/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter hovig10

    (@hovig10)

    Hi again,

    It’s working now. Probably was some kind of a css clash. I unchecked the ‘Check to use your own CSS for category legend.’ and the legend buttons are back now.

    Strange that I tried that before many times and it made no difference, but now it did the trick.

    Please let me know if you can think of anything else. Am I able to adjust the css of the legend via legend.css.php?

    Thanks again.

    Plugin Author Andy Fragen

    (@afragen)

    If you check to use your own CSS you will get no styling for the legend from the plugin. If you want the default styling leave it unchecked.

    CSS is cached. It should be refreshed if you save the settings. You can also add ?refresh_css to the URL for the calendar and the cache will be reset. When I was looking at the site early I did this.

    You may change any part of the plugin code you wish but it will be overwritten whenever an update comes out.

    What more are you trying to accomplish?

    Thread Starter hovig10

    (@hovig10)

    Thanks Andy.

    I basically want to adjust things like the font size in the legend legend buttons and even the size of the buttons themselves in the month view.

    What would you recommend as the best way to do that? Thanks again.

    Plugin Author Andy Fragen

    (@afragen)

    The best way is it add to the legend CSS via the filter hook.

    Take a look at this thread, https://www.ads-software.com/support/topic/remove-some-legends-keep-colors

    Obviously you would have to create the CSS to do what you want and use the hook to insert it.

    Thread Starter hovig10

    (@hovig10)

    Ok Andy. I’ll give that a try.
    And I place it in my child theme function.php, right? That way the CSS continues working even if the plugin is update?

    Plugin Author Andy Fragen

    (@afragen)

    That’s correct. Let me know if you have any problems.

    Study the default generated legend CSS and you should be able to find specific CSS selectors to do what you want.

    Thread Starter hovig10

    (@hovig10)

    Hi Andy,

    Still not managing to do this. For some reason, any CSS I’m putting through my theme is not making a difference. Is that because I have unchecked the ‘Check to use your own CSS for category legend.’option?

    And when I try with the filter hook through function.php, the entire site is disappearing(white screen), so it doesn’t seem to like that.

    The url is – https://www.aisc.tiv1.com/events/

    Appreciate any help you can give and sorry for taking up your time.

    Plugin Author Andy Fragen

    (@afragen)

    @hovig10 can you share the code you’re using that’s causing an error. Saving to pastebin works well.

    Also, if you let me know specifically what changes to the legend you’re trying to make I can at least get you started.

    For now you should leave the ‘Check to use your own CSS for category legend’ unchecked.

    Thread Starter hovig10

    (@hovig10)

    Here is the code –

    add_action( 'teccc_add_legend_css', function() {
    		echo '#legend_box { line-height:0.5em;} ’;
    	});

    The specific change? In the month view, I would like to make the color legend buttons smaller and tighter around the category names. So the font size of the category names stays the same but the color buttons wrap tighter around them.

    I tried all kinds of css code and changes but for some reason nothing is changing on the month view page. That’s why I’m wondering if something else is over-riding the changes.

    Over to you. Thanks again.

    Plugin Author Andy Fragen

    (@afragen)

    You have some incorrect characters in your code. Try the following.

    add_action( 'teccc_add_legend_css', function() {
    		echo '#legend_box li { line-height:0.5em;}';
    	});

    I’m not on a computer so I can’t see if the actual CSS will work, but hopefully it doesn’t white screen you.

    Plugin Author Andy Fragen

    (@afragen)

    When I get near my laptop I’ll try to address what you want to accomplish. I’m not sure your CSS will do anything this.

    Plugin Author Andy Fragen

    (@afragen)

    Try the following, I think I should do most of what you want.

    add_action( 'teccc_add_legend_css', function() {
    		echo '#tribe-events #legend li { padding: 4px; }';
    	});
    Thread Starter hovig10

    (@hovig10)

    Hi Andy,

    That didn’t work either… BUT I eventually found out what was causing the problem.

    The css in legend.css.php was overwriting any changes I was putting in. Once I fixed that, it’s working fine.

    Thanks for your time and for the great work on the plugin.

    Plugin Author Andy Fragen

    (@afragen)

    I think it really did work, it’s just that the CSS was cached. I’ve refreshed the cache. You can do this yourself by adding ?refresh_css To the end of your events URL.

    I see that you’ve modified the category.css.php file and these changes will be overwritten at next update. The hook will not be overwritten and continue to work.

    The hook servers to override category.css.php, not the other way around.

    Glad it’s working.

    Thread Starter hovig10

    (@hovig10)

    Thank Andy.

    One final question – just to clarify in my mind regarding the hook.

    If I make the change in the custom css of my theme, won’t that be the same as using the hook? Ie – they both won’t be overwritten at the next update?

    I had made the changes in legend.css.php and placed it in my child theme teccc folder. Would that mess up at the next update?

    Thanks again for all your help.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Color and Layout new problems’ is closed to new replies.