Forums

Integrate wp-print into preview frame plugin (2 posts)

  1. TheWebHead
    Member
    Posted 1 year ago #

    The preview frame plugin takes the article html sticking it in an iframe in the article's post edit so you can see your post.

    So... What can I put in the code below so that the print url replaces this "preview_url" and will display the print page in the iframe, without the theme, ads, and other content unrelated to the post?

    $preview_url = clean_url(apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID))));

    This capability may increase the usage of the print plugin, with people who don't want a print function getting it for this preview application.

  2. TheWebHead
    Member
    Posted 1 year ago #

    Make this change after installing wp-print on preview-frame.php line 14:

    $preview_url = clean_url(apply_filters('preview_page_link', add_query_arg('preview', 'true', add_query_arg('print', '1', get_permalink($post->ID)))));

    and that does the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags