WordPress.org

Ready to get started?Download WordPress

Forums

Stout Google Calendar
Can I change the colors of events? (9 posts)

  1. machon
    Member
    Posted 3 years ago #

    Is it possible to change the color of the events? For some reason they are not showing up when I embed a google calendar onto my website. Can I do this through this plugin?

  2. ncase
    Member
    Posted 3 years ago #

    I would also love to be able to change the color of the events!

    The blue color look really bad next to the rest of the design: http://yogamoves.ncase.dk/ (look under the tab: KALENDEREN)

  3. scamartist26
    Member
    Posted 3 years ago #

    For the moment this is not a function provided by the plugin. To change your calendars event color, you must do so within Google Calendar yourself. I suggest doing a search for it if you do not know how.

  4. bakaat
    Member
    Posted 3 years ago #

    I came across this post when I was searching for a way to customize google call on one of the websites. Finally came out with my own solution. So if that's what you are looking for ncase - try it out.

    All you need to do is go to plugins/stout-google-calendar/gcalendar-wrapper.php

    In line 256 change

    $headEndTag = '</head>';
    $calCustomized = preg_replace("/".preg_quote($headEndTag,'/')."/i", $calCustomStyle.$headEndTag, $calCustomized);

    to

    $headEndTag = '</head>';
    $addCustomStylesheet = '<link rel="stylesheet" type="text/css" href="http://www.yourdomain.com/wp-content/themes/blah/cal_style.css" />';
    $calCustomized = preg_replace("/".preg_quote($headEndTag,'/')."/i", $calCustomStyle.$addCustomStylesheet.$headEndTag, $calCustomized);

    where http://www.yourdomain.com/wp-content/themes/blah/cal_style.css is path to css file responsible for css for cal

  5. ncase
    Member
    Posted 2 years ago #

    Thanks bakaat!
    I'll try that out!

  6. patc890
    Member
    Posted 2 years ago #

    I tried this but it didn't seem to have any effect?

    Pat

  7. bakaat
    Member
    Posted 2 years ago #

    I've just checked on my old client's website. They're not using it anymore however I enabled it for few minutes and checked. It works there (most recent wordpress and stout gc)

    check in firebug if your custom stylesheet is being loaded.

    If it's not check the frame if the additional link tag is there, check that php code mod is right.

    If it is, css directives may need to be !important or more precise, actually, you can check if they're taking effect in firebug as well

    hope it helps

  8. georgeadamidis
    Member
    Posted 2 years ago #

    Hello -

    when I edit the colors of events on my client's website, the changes appear fine in Google, but always appear blue when viewed on the website.

    I'm not an expert here, so I'm unsure if using Bakaat's advice will work.

    Can someone help me out?
    http://www.milantailors.com/travel-schedules/
    Look at May, two events, and they are both blue, on Google Calendar neither are blue.

    Thank you!

  9. bakaat
    Member
    Posted 2 years ago #

    I've only done this once so even tough the principal is always the same (you load additional css file to override styles of what is displayed inside), i wouldn't like to act as an expert. As for your question

    Although i've done it quite some time ago, my advice should work without problem (will actually test it today evening to make 100% sure)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic