Title: how to place function directly in source code?
Last modified: August 20, 2016

---

# how to place function directly in source code?

 *  Resolved [subsonic](https://wordpress.org/support/users/subsonic/)
 * (@subsonic)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/how-to-place-function-directly-in-source-code/)
 * Hi there,
 * I like your plugin very much. I was wondering whether it is possible to place
   the plugin directly into the source code? I.e. into the header or title?
 * How would the function be called upon? Could you give me some code to work with?
 * Many regards!
 * [http://wordpress.org/extend/plugins/print-o-matic/](http://wordpress.org/extend/plugins/print-o-matic/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/how-to-place-function-directly-in-source-code/#post-3540563)
 * What you are looking for is WordPress’ [do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode)
   function. In this case you would use it like so:
 *     ```
       <?php echo do_shortcode('[print-me target="#element_id_to_print"]'); ?>
       ```
   
 *  Thread Starter [subsonic](https://wordpress.org/support/users/subsonic/)
 * (@subsonic)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/how-to-place-function-directly-in-source-code/#post-3540565)
 * Great, many thanks for your reply!
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/how-to-place-function-directly-in-source-code/#post-3540606)
 * Very welcome. Don’t forget to [vote for Pedro](http://wordpress.org/support/view/plugin-reviews/print-o-matic)!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how to place function directly in source code?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/print-o-matic_b2b2b2.svg)
 * [Print-O-Matic](https://wordpress.org/plugins/print-o-matic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/print-o-matic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/print-o-matic/)
 * [Active Topics](https://wordpress.org/support/plugin/print-o-matic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/print-o-matic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/print-o-matic/reviews/)

## Tags

 * [do_shortcode](https://wordpress.org/support/topic-tag/do_shortcode/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 3 replies
 * 2 participants
 * Last reply from: [Baden](https://wordpress.org/support/users/baden03/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/how-to-place-function-directly-in-source-code/#post-3540606)
 * Status: resolved