Bootstrap Templates Bundle

Monday, December 29, 2014

Progress bar: Making short code in Bootstrap Wordpress

Add this code to your functions.php file ---------------------------------------------------

function progress($atts, $content = null) {
 extract( shortcode_atts( array(        
          'percentage' => ''
), $atts ) );

return '<div class="progress">
  <div class="progress-bar" role="progressbar" aria-valuenow="'.$percentage.'" aria-valuemin="0" aria-valuemax="100" style="width: '.$percentage.'%;">
    ' . $percentage . '%

add_shortcode('progressbar', 'progress');

How To Use:

 [progressbar percentage="60"]60%[/progressbar]
 [progressbar percentage="70"]70%[/progressbar]

Unable to install wordpress plugins Warning

Issue: Warning: An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue ...