• I am trying to get a return on this function in functions.php:

    function story_cat_slider () {
    ob_start();

    $contenth = “”;

    $contenth .= ‘<div id=”storyslider”>

      ‘;

    query_posts(‘cat=2’);
    while (have_posts()) : the_post();

    $contenth .=’

    • <a href=”‘;
    • $contenth .='”>’;
      $contenth .= the_post_thumbnail();
      $contenth .= the_permalink();
      $contenth .= ‘
      ‘;

      endwhile;

      $contenth .= ‘
      </div>’;

      return $contenth;

      ob_end_flush();
      }

      but it is not working. Does anyone see anything wrong with this?

The topic ‘Trouble returning HTML code in a function’ is closed to new replies.