WordPress.org

Forums

Print-O-Matic
[resolved] Include on every page/post (4 posts)

  1. ajayp86
    Member
    Posted 1 year ago #

    Hi there, nice plugin. I was wondering is there an easier way to include this on every page and blog post? I know there is some sort of code you have to place a file, but I don't know the code or while files and where in the files to put them.

    Please help. Thanks.

    http://wordpress.org/plugins/print-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Hello, thanks. Yes, you would simply need to include the shortcode in your theme by using do_shortcode. If you need further assistance, please include a link to the site in question.

  3. ajayp86
    Member
    Posted 1 year ago #

    Yes I would need further assistance on that.
    The link is:
    http://mncyn.dataheads.ca

    Currently I have some pages set manually to [print-me title="Print this page" target="body"]

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Step 1. You will want to understand WordPress' do_shortcode function

    Step 2. You will need to edit your template files and insert:

    <?php echo do_shortcode('[print-me title="Print this page" target="body"]'); ?>

    Since you are targeting the body, and it's the same on every page, you could also set up body as your default target in the plugins option page.

    Since you are targeting the body and want this to be visible on every page, you could place this in your header/footer... but this really depends on WHERE you want the print icon to be displayed.

    If you need further assistance, you might want to first get comfortable with making changes to your theme template files.

    Good luck!

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