Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDawn Foster
1,899 PointsHow to install bootstrap carousel on the static front-page.php without using blog posts
I have a static full-width front-page that I want to have a large carousel rotating about 8 images in the header.
I tried just using the code from this project, and since I still have the blog posts that have images, it is working. However, I don't want to use blog posts for this.. I just want to have separate images to cycle through.. nothing to do with blog postings that can be picked up if I create a blog page later on.
What should I do? Install a bootstrap carousal plug-in? Or use short-codes? Or use custom posts that can be used in the carousal? I've played around, and just can't figure out the best method to use.
Can you please point me to a tutorial for this.. or tell me what I need for the front-page.php, functions.php, and WP admin to get this to work.
Thanks, Dawn
1 Answer
Dawn Foster
1,899 PointsI figured out one way to do it.. that is very easy and nice solution.
Download and activate the "CPT Bootstrap Carousel" plugin.
-
Then just add the following [image-carousel] shortcode in a Page or Post:
```php <?php echo do_shortcode('[image-carousel]'); ?> ```
Create new items in the Carousel post type, uploading a Featured Image for each
Hope this helps others wanting to do the same.
(for more info on the plugin, read here: https://wordpress.org/plugins/cpt-bootstrap-carousel/)
Dharmesh Sheth
2,547 PointsDharmesh Sheth
2,547 PointsDo i add the above code on the function.php,or on front-page.php?