Title: Hide functionality not working
Last modified: August 30, 2016

---

# Hide functionality not working

 *  Resolved [ncsumarit](https://wordpress.org/support/users/ncsumarit/)
 * (@ncsumarit)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/hide-functionality-not-working/)
 * Love the plugin, thanks!
 * I had been using the pervious version with some extra styling to give the .carousel-
   caption class a background color. This was ideal up to version 1.9 since the .
   carousel-caption class didn’t pass if there was no slider title or content. The
   image was left pristine for those who didn’t want to add text.
 * However with 1.9.1 the class is being delivered each time. Even when we leave
   titles and content/caption area blank, and/or when we set the settings for “Show
   Slide Titles / Captions?” to “Hide” the .carousel-captions class is still passing
   to the live site.
 * Have a site using 1.9 that you can see here: [http://dance.arts.ncsu.edu/](http://dance.arts.ncsu.edu/).
   This site is using 1.9.1 and I’ve hidden the fields with CSS but they’re still
   in the code: [http://cdc.dasa.ncsu.edu/](http://cdc.dasa.ncsu.edu/).
 * Thanks.
 * [https://wordpress.org/plugins/cpt-bootstrap-carousel/](https://wordpress.org/plugins/cpt-bootstrap-carousel/)

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

 *  Plugin Author [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/hide-functionality-not-working/#post-6570980)
 * Hi ncsumarit,
 * Thanks for the report – I had a quick look at your code and I think that this
   is happening because you have a link set for the images.
 * The code responsible for this decision is [here](https://github.com/ewels/cpt-bootstrap-carousel/blob/master/trunk/cptbc-frontend.php#L132).
   It’s a bit of a horrible line as it stands, it’s easier to understand with some
   extra spacing:
 *     ```
       if
         (
           (
             $atts['showtitle'] === 'true' && strlen($image['title']) > 0
           ) || (
             $atts['showcaption'] === 'true' && strlen($image['content']) > 0
           ) || (
             $image['url'] && $atts['link_button'] == 1
           )
         )
       {
       ```
   
 * In other words, the caption area is shown if there is a title (and ‘show title’
   is turned on), or if there is a caption (and ‘show caption’ is turned on), or
   if there is an image (and ‘link button’ is switched on).
 * Your second link has no title or caption, but it does have a link. So I suspect
   that if you disable the “Link Buttons” option in the settings, you will go back
   to having the same behaviour as before. Let me know if this isn’t the case, and
   I’ll look into it again.
 * Cheers,
 * Phil
 *  Plugin Author [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/hide-functionality-not-working/#post-6570981)
 * ..that extra spacing also shows nicely that I have a redundant set of brackets
   in there!

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

The topic ‘Hide functionality not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cpt-bootstrap-carousel_b8b7ae.svg)
 * [CPT Bootstrap Carousel](https://wordpress.org/plugins/cpt-bootstrap-carousel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cpt-bootstrap-carousel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/hide-functionality-not-working/#post-6570981)
 * Status: resolved