• Resolved paulcottin

    (@paulcottin)


    To begin with, thanks for your plugin it helps me a lot.
    However, I have a question regarding the shortcodes. Indeed, I use a shortcode in the web page to display dynamic information. The pdf generated by your plugin does not take into account what the shortcodes return and only displays the name of the shortcode (Ex: [test]). I performed various tests including the do_shortcode () function but nothing works. Do you have a solution or leads so that I can find some? maybe in which plugin file should I make changes?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author fkrauthan

    (@fkrauthan)

    What you can try todo is copy the default.php and default.css template shipped with the plugin to something custom. Then in the default.php find the string that says

    wpautop($post->post_content, true)

    and replace it with

    wpautop(do_shortcode($post->post_content), true)

    and then select your new template in the wp-mpdf settings.

    Thread Starter paulcottin

    (@paulcottin)

    Thank you for your answer but it’s doesn’t work.

    Do you see an other solution ? If no, can you tell me if you think it’s possible with your plugin to see the return of the shortcode? If you think it’s impossible
    it will save me hours of working for nothing.

    Thanks for advance.
    Paul

    Plugin Author fkrauthan

    (@fkrauthan)

    Sorry usually I get notifications even if a topic is marked as resolved. That is the only solution that I would have thought works. I never worked with shortcodes so my experience is limited with that. In theory what I suggested should have worked.

    But did you correctly copy the template and selected the new template? You need to copy default.{php,css} into the directory /wp-content/wp-mpdf-themes with a new name (e.g. mytemplate.{php,css}) then edit that new PHP file (to add my suggestion). And last but not least go to the settings page and select mytemplate as the new tempalte.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode’ is closed to new replies.