• Resolved lpltech2

    (@lpltech2)


    On a page that uses the [sc_events_calendar ] short code, in the title of the day of the event there is css such as :

    Thanksgiving <span style=”….

    I would like to use this plugin but this is stopping me. Please advise.

    if the SG Calendar block widget is used, this does not appear, however, the event is only a popup.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Patrick

    (@paddyam)

    Hey @lpltech2 thanks for reaching out, it appears the issue relates to the inclusion of inline styling on the events title. To assist with the troubleshooting, would you please confirm if you are dynamically adding this to the event titles as well as how the events show up from events view under Sugar Calendar ? Events?

    Thread Starter lpltech2

    (@lpltech2)

    Thanks for the response. There has been no css added anywhere. The event consists of the the event title (e.g. “Thanksgiving”) and the a small description (“day of thanks”)

    On the events view:

    Thread Starter lpltech2

    (@lpltech2)

    Any update on this/

    Plugin Author Michael

    (@donmhico)

    Hello @lpltech2,

    Michael here, lead developer of Sugar Calendar. It seems like there is code, possibly from your theme or from another plugin that is adding the HTML beside your post/page titles which also adds in the event titles. https://a.supportally.com/i/aLzxll

    To further debug the issue, can you test if the issue persist if you try to disable your other plugins and use another theme?

    Thread Starter lpltech2

    (@lpltech2)

    Thanks. I did your suggested actions, disable all plugins and changed theme. It appears the theme is the cause. Currently Astra is being used which is extremely popular and I’ve gone down the road with it a bit. I also cleared the custom css file (no effect). Note that I did install, de-install, install sugar calendar and also tried the event calendar at one point. I’m not sure if there are any code artifacts. Is there a possible next step?

    Thread Starter lpltech2

    (@lpltech2)

    Found the issue. I added code in functions.php to add date with post title. This apparently has wide spread effects. code:

    /* add date to post title */
    function my_add_date_to_title($title, $id) {

    // Check if we're in the loop or not
    // This should exclude menu items
    if ( !is_admin() && in_the_loop() ) {
    
        // First get the default date format
        // Alternatively, you can specify your
        // own date format instead
        $date_format = get_option('date_format');
    
        // Now get the date
        $date = get_the_date($date_format, $id); // Should return a string
    
        // Now put our string together and return it
        // You can of course tweak the markup here if you want
        $title .= '<span style="font-size:small; margin-left:3em;">(' . $date . ')</span>';
        //$title .= $date;
     }
    
    // Now return the string
    return $title;

    }

    // Hook our function to the ‘the_title’ filter
    // Note the last arg: we specify ‘2’ because we want the filter
    // to pass us both the title AND the ID to our function
    add_filter(‘the_title’,’my_add_date_to_title’,10,2);

    Plugin Author Michael

    (@donmhico)

    @lpltech2 – Glad to hear that you found whats causing the issue. Please let us know if there are anything else we can help you with.

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