• Many of the posts immediately redirect to a pdf.

    Is there a way, manually or with a plugin, to show the post URL instead of the file path of the pdf?

    • This topic was modified 7 years, 6 months ago by Jan Dembowski.
    • This topic was modified 7 years, 6 months ago by Jan Dembowski. Reason: Removed tiny URL and moved URL to place where it belongs

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • You want to url pdf thema functions.php

    [php] function cwc_viewpdf($attr, $url) {
    return ‘<iframe src="https://docs.google.com/viewer?url=’ . $url . ‘&embedded=true" style="width:’ .$attr[‘width’]. ‘; height:’ .$attr[‘height’]. ‘;" frameborder="0">Your browser should support iFrame to view this PDF document</iframe>’;
    }
    add_shortcode(’embedpdf’, ‘cwc_viewpdf’);
    [/php]

    You will do this to add [php] [embedpdf width="600px" height="500px"]https://infolab.stanford.edu/pub/papers/google.pdf[/embedpdf] [/php]

    • This reply was modified 7 years, 6 months ago by suleymankasap.
Viewing 1 replies (of 1 total)
  • The topic ‘mask pdf as post with post URL’ is closed to new replies.