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!
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 trial
Rhian Thomas
7,489 PointsCode Challenge - Shortcode Start and End Buffer
I am on step 3 of 4 of the Code Challenge - How to Create a Wordpress Shortcode. I am not sure that I am doing wrong when starting and ending the buffer. Help please?
<?php
function my_plugin_shortcode($atts, $content = null ) {
// code removed for steps 1-2 of the code challenge
ob_start();
require('inc/font-end.php');
$content = ob_get_clean();
}
?>
2 Answers

Mike Bronner
16,395 PointsI believe you have "front-end.php" misspelled. :)

Rhian Thomas
7,489 PointsOh, my! I was so focused on starting and ending the buffering that I missed the obvious. Thank you :)

Mike Bronner
16,395 PointsHappens to me all the time, too. :)