• Resolved wputler

    (@wputler)


    I have this in the Event Builder:

    <div class=\"gce-list-event gce-tooltip-event [if-description] s3Toggle [/if-description] \">[if-not-all-day][start-custom format="g:ia"][/if-not-all-day]
    [event-title]
    [if-description] <i class="fa fa-chevron-circle-down fa-lg"></i> [/if-description]</div>

    I want to add a class to the title if there’s a description (using jQuery to make it collapsible/expandable)

    If there’s no description, the resulting code ends up being:

    <div class="gce-list-event gce-tooltip-event">10:00am
     Auditions
    /div>

    Since there’s not a conditional “if-not-description”, I’m not sure how to get around this.

    https://wordpress.org/plugins/google-calendar-events/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    I tested this out a bit and it seems to work for me if I move the last </div> to it’s own line. Can you see if that works for you too?

    Thread Starter wputler

    (@wputler)

    I went to try this and now something more weird is going on. If I look at the feed from wp-admin, I see this for the post content:

    [if-not-all-day][start-custom format="g:ia"][/if-not-all-day]
    [event-title]
    [if-description] [/if-description]
    
    [if-location]
    [maps-link newwindow="true"]
    [location][/maps-link]
    
    [/if-location]
    [if-description]
    [description]
    
    [/if-description]

    But on the front end if I inspect the page source, I can see the s3Toggle class and the <div>s I added. I was careful not to save/update, and I went into the database and for the same feed, this is what it in post_content:

    <div class="gce-list-event gce-tooltip-event [if-description] s3Toggle [/if-description] ">[if-not-all-day][start-custom format="g:ia"][/if-not-all-day]
    [event-title]
    [if-description] <i class="fa fa-chevron-circle-down fa-lg"></i> [/if-description]</div>
    <div class="s3ToggleContent">
    
    [if-location]
    <div>[maps-link newwindow="true"] <i class="fa fa-map-marker"></i>
    [location][/maps-link]</div>
    [/if-location]
    [if-description]
    <div>[description]</div>
    [/if-description]
    
    </div>

    The feed editor is not picking up what’s in post_content – it’s using the default!

    Now what??

    Plugin Contributor Nick Young

    (@nickyoung87)

    Is there something possibly overriding it then? You could try disabling other plugins and using a default theme to see if there is a conflict somewhere.

    Also, what version of the plugin are you using?

    Plugin Contributor Nick Young

    (@nickyoung87)

    Assuming this got resolved since there has not been a reply. Let us know if you have any further questions.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘if-description not working in quotes’ is closed to new replies.