WordPress.org

Ready to get started?Download WordPress

Forums

Print Button Shortcode
Doesn't work, just loads a blank page with an undefined error (4 posts)

  1. reflexiv
    Member
    Posted 1 year ago #

    Doesn't work, just loads a blank page with the word "undefined"

    http://wordpress.org/extend/plugins/print-button-shortcode/

  2. reportica
    Member
    Posted 11 months ago #

    Hi Reflexiv,

    I am not the plugin author but I had a similar error. Then I notice that when I updated the page, WordPress had added extra div tags before and after the shortcode. When I deleted those it was fine.

    What I entered into the body of a post:
    ----------
    <div id='print_div'>
    bla bla my post
    bla bla my post
    bla bla my post
    <div/>
    [print-button target='div#print_div']
    ----------
    What I saw after update, after WordPress fixed my post.
    ----------
    <div id='print_div'>
    bla bla my post
    bla bla my post
    bla bla my post
    <div><div/>
    [print-button target='div#print_div']<div/>

    ----------
    I deleted the WordPress-imposed fix and re-updated. All good. It does not re-fix upon saving again. Curious.

  3. webmystery
    Member
    Posted 5 months ago #

    remove the spaces between the brackets and the code. Instead of this:
    [ print-button ] do this: [print-button]

  4. webmystery
    Member
    Posted 5 months ago #

    or do this: [print-button target='body.page']

    It is supposed to print the 'body' tag id you don't define a target, but that's not working in my theme.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.