WordPress.org

Ready to get started?Download WordPress

Forums

CPT Bootstrap Carousel
[resolved] Attached Images (6 posts)

  1. Christine
    Member
    Posted 1 year ago #

    Hi there
    This is a great plugin and very useful for a home page slider if using Twitter Bootstrap in your theme.
    Thanks.

    Just one question- how do you put this into a theme template file (say a homepage) please?
    http://wordpress.org/extend/plugins/cpt-bootstrap-carousel/

  2. Phil Ewels
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Christine. You can use shortcodes from within theme template files using the do_shortcode function.

    For example:
    echo do_shortcode('[image-carousel] ');

  3. Phil Ewels
    Member
    Plugin Author

    Posted 1 year ago #

    ps. If you like and use the plugin, please consider writing a review: http://wordpress.org/support/view/plugin-reviews/cpt-bootstrap-carousel

    Those five star ratings really help others to find (and trust) the plugin.. :)

  4. Christine
    Member
    Posted 1 year ago #

    Hi again
    Could you tell me how to load the shortcode in the theme- but only if this plugin is activated please.

    Thanks
    Christine

  5. Phil Ewels
    Member
    Plugin Author

    Posted 1 year ago #

    Hi 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

  6. Christine
    Member
    Posted 1 year ago #

    Hi Phil
    that works great thanks :)

    Christine

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic