Print-o-matic shortcode in dashboard metabox? - Instructions for multisite users (3 posts)

  1. robbiet63
    Posted 3 years ago #

    Is there a way to use Print-o-matic short-code to display a print icon within a Dashboard metabox (in the back-end)? I'm using multisite, providing instructions to users in the Dashboard using metaboxes, and would like an easy way for users to print the instructions.



  2. Baden
    Plugin Author

    Posted 3 years ago #

    Do you mean Dashboard Widget or Write Screen MetaBox?

    Either way, the plugin currently loads only on the front end:
    print-o-matic.php line: 84

    //load the script and style if not viewing the dashboard
    		if (!is_admin()){
    			add_action('init', array( $this, 'printMaticInit' ) );

    you might try and comment out the if clause (keeping the add_action bit) and then manually call the print-me shortcode using do_shortcode --no idea if that will work or not. If not, then you might try rolling your own by using something like the following basic structure:

    <div class='printomatic' id='unique_id' title='' ></div>
    <input type='hidden' id='target-unique_id' value='target_goes_here' />

    Please let us know if you get it working... and how.

  3. robbiet63
    Posted 3 years ago #

    Hi Baden,

    Thank you for your prompt reply. It is a Dashboard Widget. I will try the suggested fix and keep you posted. I may not get to it for a little while but it's on my list.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Print-O-Matic
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic