Phil Ewels
Forum Replies Created
-
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Hide functionality not working..that extra spacing also shows nicely that I have a redundant set of brackets in there!
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Hide functionality not workingHi 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. 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
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Fontawesome iconsApologies, I should really have read your original post more carefully. Yes, the customprev and customnext fields do scrub HTML, the ones I tested (HTML before / after) do not.
It’s not possible to keep HTML in the customprev and customnext fields because this content is printed as a class attribute within the previous and next buttons:
<a [..] data-slide="prev"><span class="<?php echo $atts['customprev'] ?> icon-prev"></span></a>I think you should get the effect you’re looking for by saving
fa fa-angle-rightin these fields?Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Fontawesome iconsHi Andy,
I’m a bit confused – do you mean the “HTML before title” etc. fields? I just had a go and copied your code into these fields and they seemed to show in the resulting page html. I then tried again with the bootstrap glyphicons (
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>) and that also worked fine and showed up.Is this what you mean?
Phil
Ok, written and working. You can get a copy from GitHub: https://github.com/ewels/cpt-bootstrap-carousel
It’ll probably be a while before there are enough updates to warrant a new release on wordpress.org though…
Hi Andy,
No, you’re right – that’s exactly what I did. Not so much preventing the title from displaying on the front end, but rather decoupling the title from the excerpt, so that if either are filled in then they show on the carousel. I did this because I had assumed that this was already the behaviour.
Toggles would be fine but would be extra code and complexity, and as you can see the thumbnails in the wordpress admin anyway I usually think that the titles are a little redundant (this of course depends on how different your images are). I guess I could split the toggle that is in the settings page to work for titles and excerpts separately. For me this is less urgent though, as it’s to aid ease of administration rather than a blocker in what is possible to achieve on the front end with the carousel. I’ll see if I can write it in to the dev version on GitHub for you though.
Phil
Ok, I thought that this was an easy and sensible change so I did it. There were quite a few such small changes ready to go, so I just pushed the latest version of the plugin to wordpress.org with your suggested changes: https://wordpress.org/plugins/cpt-bootstrap-carousel/
If you update the plugin it should work more as you except. Thanks for the suggestion!
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Disable animation not workingHi John,
I’ve just pushed the latest version of the plugin to wordpress.org with your suggested changes: https://wordpress.org/plugins/cpt-bootstrap-carousel/
Thanks again!
I take it back – you’re entirely correct, apologies.
Hi studio4,
I think that the current behaviour is just to leave either blank – off the top of my head I thought that both show independently if they’re filled in. Is this not the case?
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Caption is not displaying after 5th Slide.Hi Rashuz,
It looks like you’re using a different image slider now, so I’ll mark this as resolved. Drop me a mail through http://phil.ewels.co.uk/ if not.
Cheers,
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] The carousel is working ok, but it appears a warningHi uliman,
The error message doesn’t come from this plugin. After a bit of googling, it looks like it comes from your theme, Dazzling (see code).
Looking at the code I would guess that there is a checkbox somewhere in the theme settings (“
dazzling_slider_checkbox“) where you can turn off a slider. I bet if you untick this box the message will disappear.Good luck!
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Caption is not displaying after 5th Slide.This is super weird – what happens if you change the order of the slides? Can you get a slide that was working normally to stop working when its order is changed?
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Caption is not displaying after 5th Slide.Hi there,
Ok – I just had a look. The reason that only the caption headings are showing, and not the captions themselves is the following CSS that you have in your
style.cssfile:.carousel-caption p { display: none; }The Australia image doesn’t have any caption in the markup, which would usually only be the case when there is no title and body text caption for that item in the carousel post. There were 9 slides when I looked at the carousel, and all looked fine apart from the Australia slide. Maybe you could try deleting this post from the plugin and adding it again?
If you can get the same thing to happen with a different carousel item, let me know.
I hope this helps!
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] add "img-rounded' class to to img tagHi volution,
Bit confused but going on your title question – can the
img-roundedclass be added to the carousel image – the short answer is no, not really.The longer answer is that the plugin uses the wordpress
get_the_post_thumbnail()function, which doesn’t seem to have this functionality enabled. It would be possible to search and replace string manipulations or to use jQuery to add the class, but this gets a bit messy.However – if you check out the bootstrap source CSS, you’ll find that the
img-roundedclass doesn’t actually do very much:.img-rounded { border-radius: 6px; }So my suggestion would be that you just add a new CSS class yourself which does the same thing. Something like this should work:
.carousel-inner .item img { border-radius: 6px; }I hope that helps! Shout if you have any questions.
Cheers,
Phil