• Resolved nathalizator

    (@nathalizator)


    hi ! I would not like to use the button gave by pdf friendly but just need to integrate the link into my template.

    Here is the part where i should add it ! How can i just add php code to show the link in ahref ?

    <?php if(!empty($show_pdf) and $show_pdf): ?>
    <?php if(!empty($car_brochure)): ?>

    • <a
      href=”<?php echo esc_url(wp_get_attachment_url($car_brochure)); ?>
      class=”car-action-unit stm-brochure”
      title=”<?php esc_html_e(‘Download brochure’, ‘motors’); ?>”
      download>
      <i class=”stm-icon-brochure”></i>
      <?php esc_html_e(‘Car brochure’, ‘motors’); ?>
    • <?php endif; ?>
      <?php endif; ?>

      Thanks 🙂

      https://ww.wp.xz.cn/plugins/printfriendly/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Hi @nathalizator,

    I hope you are well today and thank you for your question.

    You can try achieving this by adding the following code in the href attribute of link.

    'http://www.printfriendly.com/print?headerImageUrl=&headerTagline=&pfCustomCSS=&imageDisplayStyle=right&disableClickToDel=0&disablePDF=0&disablePrint=0&disableEmail=0&hideImages=0&url='.urlencode(get_permalink()).'&source=wp';

    Best Regards,

    Thread Starter nathalizator

    (@nathalizator)

    When i add this code like this :

    <a
    						href="http://www.printfriendly.com/print?headerImageUrl=&headerTagline=&pfCustomCSS=&imageDisplayStyle=right&disableClickToDel=0&disablePDF=0&disablePrint=0&disableEmail=0&hideImages=0&url='.urlencode(get_permalink()).'&source=wp';"
    						class="car-action-unit stm-brochure"
    						title="<?php esc_html_e('Download brochure', 'motors'); ?>"
    						>
    						<i class="stm-icon-brochure"></i>
    						<?php esc_html_e('Car brochure', 'motors'); ?>
    					</a>

    I have the window of printfriendly opening but the page is an error page ” The requested URL could not be retrieved ”

    Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    .

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Don't use button / Custom my template’ is closed to new replies.