Show and Hide Content / Conditional Tags

Home Forums Calendar Products Events Calendar PRO Show and Hide Content / Conditional Tags

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #908676
    artworkcreative
    Participant

    Hi,

    I am trying to add an additional function to the photo view of this plugin. I would like to add a show/hide option for the content below the image so that when the page loads it just shows the title, image and show/hide button to allow users to show text content before going into the detailed event page?

    I have trialled a simple jquery toggle button system on the page but when the toggle button is clicked it only affects the first event regardless of which event button is selected, so if the system could be filtered down to individual events that would solve my issue?

    Also is it possible to identify the events section, I tried to identify it by using is_post_type_archive() and other conditional tags but I cant find the right one. Example below:

    <?php if (is_post_type_archive(‘events’)) { echo ” class=\”current\””; }?>

    Thanks,
    Sam

    #908899
    Brian
    Member

    Hello,

    I can help you out here. We do have a bunch of different conditionals that enable you to target specific views.

    See if this list helps you out:

    https://gist.github.com/jo-snips/2415009

    Let me know if you have any follow up questions.

    Thanks

    #910332
    artworkcreative
    Participant

    Hi Brian,

    Is there a conditional tag to cover all event views in one?

    Thanks,
    Sam

    #911591
    Brian
    Member

    Hi Sam,

    See my answer below:

    Is there a conditional tag to cover all event views in one?

    Nope, you can string them together into one statement.

    If you look at this snippet it targets all the views:

    https://gist.github.com/jesseeproductions/8d0947375b5ba10a1b5e

    You will have to modify it to get it to do what you would like, but that will be close.

    #918262
    artworkcreative
    Participant

    Hi Brian,

    Thank you for the information, I think I have found a work around it.

    I have implemented an additional widget section within the events page template (only on events system) and then set the widget visibility to appear on all events pages with the link as active by default.

    However when the user goes to a non event page, it will return to the automatic system for recognising pages and custom post types.

    Thank you for your advice.

    Sam

    #918431
    Brian
    Member

    That sounds good. Glad you having it working the way you would like.

    Since there is nothing more to do here for now I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Show and Hide Content / Conditional Tags’ is closed to new replies.