Body class function

Home Forums Calendar Products Events Calendar PRO Body class function

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #15092
    Ken
    Participant

    I have this as by body class function
    if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
    $classes[] = 'singular no-sidebars';

    What would I need to add to the conditional statement so that if I’m using the default event template I want the statement to be false? I tried adding the following, but it did not work : && ! is_page_template( 'ecp-single-template.php' )

    #15104
    Rob
    Member

    Interesting question, Ken. Not sure about this myself but let me see if Jonah has any ideas. I’ll get him to chime in directly if he does.

    #15127
    Jonah
    Participant

    Hey Ken,

    What about using:


    && 'tribe_events' != get_post_type()

    or:


    && !tribe_is_event()

    #15145
    Ken
    Participant

    Thanks guys the second option works like a champ.

    #15172
    Rob
    Member

    Excellent to hear, Ken! Appreciate the confirmation. If you need anything else as you continue using this plugin, please do let us know.

    #975625
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Body class function’ is closed to new replies.