germanny
12/21/2012 - 8:35 PM

Featured Schools Box Shortcode

Featured Schools Box Shortcode

<?php // SHORTCODE - Featured School
  function jg_featured_school( $atts ) {
    extract(shortcode_atts(array(
      "school" => 'Kaplan University',
      "boxtitle" => 'Featured College',
      "boxclass" => 'inset featured-school-inset fs-shortcode',
      'description' => 'This is a test description.'
    ), $atts));
    return
    '<div class="'.$boxclass.'">
      <a href="http://college.onlinecollege.org/forms/'.strtolower(str_replace(' ', '-', $school)).'?publisher=onlinecollegeorg" title="'.$school.'">
        <div>
          <h3>'.$boxtitle.'</h3>
          <div><img src="http://college.onlinecollege.org/images/logos/'.strtolower(str_replace(' ', '-', $school)).'.155px.png?p=COLOR&amp;o=VERTICAL" alt="'.$school.'"></div>
          <button type="submit"><span>Request Info</button>
        </div>
      </a> 					 				
    </div>';
  }
  add_shortcode( 'featured-school', 'jg_featured_school' );
?>