Title: Shortcode on posts
Last modified: August 30, 2016

---

# Shortcode on posts

 *  Resolved [Manas Mitra](https://wordpress.org/support/users/manas666/)
 * (@manas666)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/)
 * Congratulation developer dinamico on creating such an excellent plugin. I have
   a little query. I have a couple of short codes on my post pages. One is to protect
   the content for a membership reason (membership 2 plugin) & a _Back_ button (
   zilla short codes plugin). The PDF is created along with the output of above 
   mentioned shortcodes. Is it any way possible to remove shortcodes’ outputs from
   the resulting PDF?
 * [https://wordpress.org/plugins/dk-pdf/](https://wordpress.org/plugins/dk-pdf/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/shortcode-on-posts/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-on-posts/page/2/?output_format=md)

 *  [amazigh toto](https://wordpress.org/support/users/amenzoweb/)
 * (@amenzoweb)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720858)
 * [dkpdf-button] i found it in plugin website 🙂
 * Enjoy
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720883)
 * Hi manas666,
 * I’m going to install membership 2 plugin in my local dev and I’m going to try
   to reproduce the problem, once I get more info about this, I’m going to reply
   here.
 * Best.
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720884)
 * Hi manas666, just some doubts:
 * do you need just removing the shortcodes? for example not showing a button (generated
   by a shortcode) in the pdf?
 * in the case of membership 2 plugin, the private/protected content is showing 
   in the pdf?
    or you just need to remove some kind of message like ‘you are viewing
   private content….’.
 * thanks.
 *  [sjo007](https://wordpress.org/support/users/sjo007/)
 * (@sjo007)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720897)
 * Hi,
 * I have the same problem with the dkpdf button shortcode displaying on the pdf
   form. I am using Membership 2 Pro but there is no printing errors relating to
   this that I am aware of on pdf form. It is just the dkpdf shortcode that keeps
   appearing.
 * How do I stop this showing on the pdf form please ? Great plugin though for which
   many thanks indeed !
 * Best wishes
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720898)
 * Hi sjo007,
 * Ok I’m going to look at this, it’s strange because DK PDF has a function for 
   not showing the pdf button in the generated PDF, also there is a solved ticket
   related to this for when you’re adding the button manually via [dkpdf-button]
   shortcode:
    [https://wordpress.org/support/topic/remove-print-button-from-pdf](https://wordpress.org/support/topic/remove-print-button-from-pdf)
 * I need some info:
    – this happens only with Membership 2 Pro content/pages? or
   with all your content (normal pages, posts…)? – can you guide me a little about
   the steps to reproduce this problem?
 * Thanks in advance.
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720920)
 * Hi there,
 * In version 1.3 I added a shortcode for removing pieces of content in the generated
   PDF:
    [http://wp.dinamiko.com/demos/dkpdf/doc/dkpdf-remove-shortcode/](http://wp.dinamiko.com/demos/dkpdf/doc/dkpdf-remove-shortcode/)
 * Best.
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720933)
 * Also in version 1.4 you can add page breaks using dkpdf-pagebreak shortcode:
   
   [http://wp.dinamiko.com/demos/dkpdf/doc/dkpdf-pagebreak/](http://wp.dinamiko.com/demos/dkpdf/doc/dkpdf-pagebreak/)
 *  Thread Starter [Manas Mitra](https://wordpress.org/support/users/manas666/)
 * (@manas666)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720934)
 * Hi dinamiko,
 * The [dkpdf-remove] shortcode solves the problem of removing contents from the
   output PDF files, but it creates another problem which is more alarming. This
   shortcode renders other shortcodes useless.
 * To protect a content using membership 2 plugin, the content must be within the
   following shortcodes: `[ms-protect-content id="634"]` & `[/ms-protect-content
   id="634"]` where `634` is the code generated by the membership 2 plugin. These
   shortcodes creates visible notification in screen as well as PDF output. Screen
   notification is removed using CSS. But when I use dkpdf-remove shortcode as following:`[
   dkpdf-remove][ms-protect-content id="634"][/dkpdf-remove]`, the membership 2 
   shortcode becomes visible and it’s functionality also ceases. Any idea how to
   solve it?
 * — Manas
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720935)
 * Hi Manas Mitra,
 * I didn’t test DK PDF with Membership 2 Pro yet.
    before I start to test it, please
   ensure that you’re closing the Membership 2 Pro shortcode, in your example you
   are not closing it:
 * > [dkpdf-remove][ms-protect-content id=”634″][/dkpdf-remove]
 * this has to be:
 * > [dkpdf-remove][ms-protect-content id=”634″]content here[/ms-protect-content
   > id=”634″][/dkpdf-remove]
 * if doing this way is not working, then I’m going to install Membership 2 Pro 
   and do testing.
 * tell me something about it, thanks.
 * Best.
 *  Thread Starter [Manas Mitra](https://wordpress.org/support/users/manas666/)
 * (@manas666)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720942)
 * Hi dinamiko,
 * Thanks for your reply. I got busy in other projects, so couldn’t reply. I shall
   try the way you have shown. I am using the free version of Membership 2 plugin
   not the pro one. Thanks for your support again.
 * — Manas
 *  [pa7x](https://wordpress.org/support/users/pa7x/)
 * (@pa7x)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720968)
 * Hi dinamiko,
    is it possible to add dkpdf-button to to the WP masterpage manually?
   What’s the “shortcode” to do it? [dkpdf-button] works fine, but i need sth to
   add to php file.
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720969)
 * Hi pa7x,
 * use this code:
 *     ```
       <?php echo do_shortcode('[dkpdf-button]');?>
       ```
   
 * Best.
 *  [pa7x](https://wordpress.org/support/users/pa7x/)
 * (@pa7x)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720970)
 * Thank U dinamiko
    now it works just fine 🙂
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720971)
 * You’re welcome 🙂
 *  [pa7x](https://wordpress.org/support/users/pa7x/)
 * (@pa7x)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-on-posts/#post-6720972)
 * And just let me ask one question:
    where can I find the icon file? I’d like to
   change dafault icon and set up my own. As for me – it looks impossible to find
   it 🙂

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/shortcode-on-posts/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-on-posts/page/2/?output_format=md)

The topic ‘Shortcode on posts’ is closed to new replies.

 * ![](https://ps.w.org/dk-pdf/assets/icon-256x256.png?rev=3396282)
 * [DK PDF - WordPress PDF Generator](https://wordpress.org/plugins/dk-pdf/)
 * [Support Threads](https://wordpress.org/support/plugin/dk-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/dk-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dk-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dk-pdf/reviews/)

 * 16 replies
 * 5 participants
 * Last reply from: [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-on-posts/page/2/#post-6720973)
 * Status: resolved