WordPress.org

Ready to get started?Download WordPress

Forums

Print-O-Matic
[resolved] Undefined (9 posts)

  1. progrations
    Member
    Posted 1 year ago #

    I'm having trouble getting the shortcode [print-me] to work. I've tried it on a couple different sites and with Chrome and Firefox, but always get the "undefined" result.
    I did the basic "add plugin" and installed and activated.
    This is the instance i'm currently trying to get to work:
    http://www.activeworkingcredit.com

    Thank you!

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

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    what shortcode are you using?
    You need to tell the shortcode what element to print (in your case the div with an ID of content) by assigning the target attribute like so:

    [print-me target="#content"]
  3. progrations
    Member
    Posted 1 year ago #

    Awesome, thank you for your assistance. Works now!

  4. progrations
    Member
    Posted 1 year ago #

    Would you mind one more question?
    I've used print-o-matic with the suggestion you made above on this page: http://www.playaulait.com/preschool-prep-registration-2/

    It unfortunately includes "like us on facebook" etc... at the bottom of the printed page.

    I assume i need to change the target from "#content" to something else, but i'm having a hard time figuring that out.

    thank you....

  5. progrations
    Member
    Posted 1 year ago #

    I've also tried target="body" but that prints too much of the other items on the page.

    I just want to print the registration form from the url i referenced above. I'm just not sure where to search for other types of variables to try.

    Thx!

  6. progrations
    Member
    Posted 1 year ago #


  7. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    You have three choices:
    ID:
    Look for id="your_id" in the element you want to print in the source HTML of your page.
    target="#your_id"

    CLASS:
    Look for class="your_class" in the element you want to print in the source HTML of your page.
    target=".your_class"

    ELEMENT
    Look for <your_element>...</your_element> you want to print in the source HTML of your page.
    target="your_element"

    If you provided more detail on exactly what you wanted to print, we could be of further assistance.

  8. Derpot
    Member
    Posted 1 year ago #

    Sir Baden, I have a related problem. After clicking on the printer icon, a new page is created with all the elements that I wanted to be printed. However, it does not automatically open the printer window. How do I resolve this?

  9. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Derpot, do you have a link for us?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic