WordPress.org

Ready to get started?Download WordPress

Forums

Print-O-Matic
[resolved] how to place function directly in source code? (4 posts)

  1. subsonic
    Member
    Posted 1 year ago #

    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/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    What you are looking for is WordPress' do_shortcode function. In this case you would use it like so:

    <?php echo do_shortcode('[print-me target="#element_id_to_print"]'); ?>
  3. subsonic
    Member
    Posted 1 year ago #

    Great, many thanks for your reply!

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Very welcome. Don't forget to vote for Pedro!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic