• Resolved Tyler

    (@tyleraldridge85)


    WP: 4.1
    Theme: Vantage Premium
    Site: http://www.rxaidllc.com

    Issue: Attempting to add print/pdf buttons to a post created with PageBuilder.

    Print and PDF settings: Enabled only for Posts and Custom Posts. Settings for shorcodes Do! is selected, Show the print window is selected.

    http://rxaidllc.com/print/ – this post uses normal HTML and the print/pdf buttons work fine.

    http://rxaidllc.com/template – this post uses PageBuilder and is not showing the print/pdf buttons.

    I’ve tried added the following to my functions.php to generate a shortcode:

    add_filter('widget_text', 'do_shortcode');
    
    /**
     * Shortcode for printfriendly buttons
     */
    add_shortcode('pf_button', 'get_printfriendly_button');
    function get_printfriendly_button() {
    	if( function_exists('pf_show_link') ){
    		return pf_show_link();
    	}
    }

    And then I have added the [pf_button] shortcode to the Text/HTML widget inside PageBuilder on that template post. The buttons are still not showing, and I’m not quite sure why. Any pointers?

    https://wordpress.org/plugins/pdf-print/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Tyler

    (@tyleraldridge85)

    note: I have manually added print/pdf buttons to this page as of today. The [pf_button] shortcode is still in there directly under my manually created buttons. Still confused as to why this shortcode is not working, or why they are not showing on my PageBuilder built post, but are showing on a normal post.

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    We have received your query and it is now being processed. We will get back to you on this forum as soon as we can.

    Regards,
    BestWebSoft Support Team

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Dear Tyler,

    PDF & Print plugin does not have any shortcodes for button display. Our plugin is created in such a way, that buttons are displayed when a function the_content() is called. It appears that this function is either absent, or does not go off on the page created in PageBuilder, and that is why you do not see the buttons on the page http://rxaidllc.com/template. Also, the plugin provides an option to add the buttons manually, using the PHP code:

    <?php if ( function_exists( 'pdfprnt_show_buttons_for_custom_post_type' ) ) echo pdfprnt_show_buttons_for_custom_post_type( $custom_query ); ?>

    where you have to specify query parameters for your custom post.

    For example:

    <?php if ( function_exists( 'pdfprnt_show_buttons_for_custom_post_type' ) ) echo pdfprnt_show_buttons_for_custom_post_type( 'post_type=gallery&orderby=post_date' ); ?>

    or

    <?php if ( function_exists( 'pdfprnt_show_buttons_for_custom_post_type' ) ) echo pdfprnt_show_buttons_for_custom_post_type( array( 'post_type' => 'gallery', 'orderby' => 'post_date' ) ); ?>

    For more information on the syntax for assigning parameters to function see here – http://codex.wordpress.org/Class_Reference/WP_Query#Parameters.

    Also, we’d like to let you know that For generating a pdf/print page version, PDF & Print plugin uses the content that is featured in the body of post/page before it is displayed by the browser (i.e. the data featured in the main block on this post/page in the edit mode).

    Regards,
    BestWebSoft Support Team

    Thread Starter Tyler

    (@tyleraldridge85)

    I added the buttons manually by using my own buttons and using the Print & PDF hyperlinks. This is working for me so I’ll keep it as is.

    Maybe Print & PDF can add functionality with PageBuilder in a future version. Thanks for the response.

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi Tyler,

    You are welcome! We are glad that you found a solution. We will consider this option, and if we regard it as necessary, we will implement it. However, we are not planning on doing so in the near future.

    Regards,
    BestWebSoft Support Team

    Hi bestwebsoft,

    Thanks for potentially useful info in this exchange. I’m not coding-literate and disappointed you’re not planning to make your fantastic plugin Pagebuilder-friendly. Doesn’t this cut out quite a lot of us that rely on it. Would really appreciate if you could reconsider.
    All the best.

    Hi Tyler,

    Don’t know if you’ll see this post but I’m a complete novice with website building and totally rely on page builder with no coding. Apologies for asking but if you do see this and can spare the time, could give me a stupids-step-by-step-guide to how you cracked the problem with print / pdf for page builder? Thanks so much.

    David

    Thread Starter Tyler

    (@tyleraldridge85)

    I actually wound up using the “Print Friendly and PDF” plugin instead because it has a nicer interface. But, they don’t support PageBuilder either so the work around was the same.

    First you need to have a page where the buttons actually work. So just make a normal page with the plugin on.

    When you hover over the print/pdf button you will see the hyperlink it’s using, right click on the button and copy the link address.

    This hyperlink is the format I used for my custom buttons (using Shortcodes Ultimate plugin), you just need to change the hyperlink a little according to the page name.

    If you look at this page: http://www.rxaidllc.com/coupon/ you will see the buttons link (my plugin uses an outside page, PDF and Print doesn’t) points to the URL of that page using that hyperlink format.

    Hope that helps.

    That’s fantastic Tyler, thanks so much for taking the time to post this really helpful advice. It is much appreciated. Cheers.

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi all,

    Our plugin is created in such a way, that buttons are displayed when the following function is called: the_content() – http://codex.wordpress.org/Function_Reference/the_content. Apparently, this function is either absent, or does not go off on the page created in PageBuilder plugin.

    Regards,
    BestWebSoft Support Team

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Buttons not showing on PageBuilder built posts’ is closed to new replies.