Phil Ewels
Forum Replies Created
-
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Adding custom field support?Also, if you like the plugin I’d appreciate you leaving a review here – it makes a big difference! Cheers..
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Adding custom field support?Hi StenW ,
Your timing is very good, I was working on something similar last night! Github user @atnon made a very similar modification to the code 10 days ago, also using custom-fields (though giving the image a link rather than putting a link in the caption). You can see his pull request here: https://github.com/atnon/cpt-bootstrap-carousel/blob/ed4e8bf2e2ebe73a54d8de7f0e3075f830993029/trunk/cpt-bootstrap-carousel.php
I re-wrote his code and released an update to the plugin last night, so if you’re happy with just the image having a link you should be able to do that with the update.
I can’t see any problems with your code on the face of it. If I were you, I’d update the plugin to incorporate my new code and then make a small edit just to change where the link is being printed in the output. That way you get a cleaner meta-box instead of relying on custom fields and it should work without much debugging.
Example (untested):
<div class="item <?php echo $key == 0 ? 'active' : ''; ?>"> <?php echo $image['image']; if($atts['showcaption'] === 'true') { ?> <div class="carousel-caption"> <h4><?php echo $image['title']; ?></h4> <p><?php echo $image['content']; ?></p> <?php if($image['url']) { echo '<a href="'.$image['url'].'"'; if($image['url_openblank']) { echo ' target="_blank"'; } echo '>L?s mer</a>'; } ?> </div> <?php } ?> </div>
I hope that helps, let me know how you get on..
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] using article post type ?I think this is probably beyond the remit of this plugin for now, but it should be possible.
It would require looping through recent posts and using the has_post_thumbnail() function to test whether each post has a featured image. If so, output the_post_thumbnail() with the relevant HTML and you’re away… (I think, off the top of my head).
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] JavascriptHey,
Difficult to say exactly what’s going on without seeing your site. As you say, you need to include the Bootstrap CSS and javascript for the carousel to work. If you don’t have it yet, you can hotlink them from the Bootstrap CDN by adding the following two lines of code into your theme’s header.php file:
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
Further instructions here: https://www.bootstrapcdn.com/
Bear in mind that including the bootstrap CSS may mess up the way that your site displays, so have a play with including / not including it.
Hope that helps – shout if you’re still struggling..
Phil
Forum: Reviews
In reply to: [CPT Bootstrap Carousel] badThanks for your constructive criticism. In what way is it not working?
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Attached ImagesHi Christine,
You can detect whether a plugin is active or not using the is_plugin_active wordpress function.
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if (is_plugin_active('cpt-bootstrap-carousel/cpt-bootstrap-carousel.php')) { echo do_shortcode('[image-carousel]'); }
Hope that helps!
Phil
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Attached Imagesps. If you like and use the plugin, please consider writing a review: https://www.ads-software.com/support/view/plugin-reviews/cpt-bootstrap-carousel
Those five star ratings really help others to find (and trust) the plugin.. ??
Forum: Plugins
In reply to: [CPT Bootstrap Carousel] Attached ImagesThanks Christine. You can use shortcodes from within theme template files using the do_shortcode function.
For example:
echo do_shortcode('[image-carousel] ');
Forum: Reviews
In reply to: [CPT Bootstrap Carousel] Does exactly what it should doGlad you like it! Good idea about the github repo, it’s now up here: https://github.com/tallphil/cpt-bootstrap-carousel
Forum: Plugins
In reply to: [Flickr Press] [Plugin: Flickr Press] flickr press unofficial updatesThanks mukeshwani, you should see a drop down box on the ‘General’ tab of the main settings page (Settings > Flickr Settings) for Photo Size, third down. There are three options: small, medium and large.
Is this option not there for you?
Thanks for the new release of EM5 – lots of nice new features. I’m struggling with how to exclude a category still though..
$events = EM_Events::get(array('category'=>'-32', 'orderby'=>'start_date,name'));
Sorry for being slow – any chance of a push in the right direction?
Awesome, that’s quite a changelog! I look forward to the full release..
Forum: Plugins
In reply to: [Enhanced Custom Menu] Just doesn't workTry https://www.ads-software.com/extend/plugins/gecka-submenu/ instead – that one does work the way you might expect…
Forum: Plugins
In reply to: [Enhanced Custom Menu] Enhanced Custom Menu Doesn't actually workTry https://www.ads-software.com/extend/plugins/gecka-submenu/ instead – that one does work the way you might expect…
Forum: Plugins
In reply to: [Autocompleter] Beware – Adds a hidden link to bottom of blog pageThis feature is pointed out in the plugin and can easily be disabled via a checkbox option on the administration page.