Title: Hard code directly into template
Last modified: August 21, 2016

---

# Hard code directly into template

 *  Resolved [Nuclear Ape](https://wordpress.org/support/users/nuclear-ape/)
 * (@nuclear-ape)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/hard-code-directly-into-template/)
 * Hi,
 * Is it possible to place this progress bar directly into the theme’s template 
   files?
 * I don’t want to put the shortcode into the WYSIWYG editor, I’m after a bit of
   php (or whatever) to paste directly in the theme file.
 * Is this possible?
 * [https://wordpress.org/plugins/progress-bar/](https://wordpress.org/plugins/progress-bar/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chris Reynolds](https://wordpress.org/support/users/jazzs3quence/)
 * (@jazzs3quence)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/hard-code-directly-into-template/#post-4869876)
 * I suppose if you really wanted to you could run the main function directly, passing
   all the arguments to the function, it would be something like:
 *     ```
       echo wppb_get_progress_bar( $location, $text, $progress, $option, $width, $fullwidth, $color, $gradient, $gradient_end);
       ```
   
 * (see the functions.php in the plugin)
 * The easier way would be to do it with `do_shortcode` and just wrap the shortcode
   in that function…so:
 *     ```
       echo do_shortcode( '[wppb progress=50 option="animated-candystripe green"]' );
       ```
   
 * I’ve never actually tried calling the function directly (though that’s really
   all the shortcode is doing — grabbing the attributes and feeding them into that
   function), so I can’t guarantee that that method would work. The `do_shortcode`
   method absolutely _will_ work — the only problem is you’re hard-coding your progress(
   unless you want to set that as a custom meta field that gets passed to a variable
   in your template file).

Viewing 1 replies (of 1 total)

The topic ‘Hard code directly into template’ is closed to new replies.

 * ![](https://ps.w.org/progress-bar/assets/icon-256x256.png?rev=2909774)
 * [Progress Bar](https://wordpress.org/plugins/progress-bar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/progress-bar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/progress-bar/)
 * [Active Topics](https://wordpress.org/support/plugin/progress-bar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/progress-bar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/progress-bar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chris Reynolds](https://wordpress.org/support/users/jazzs3quence/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/hard-code-directly-into-template/#post-4869876)
 * Status: resolved