WordPress.org

Ready to get started?Download WordPress

Forums

WP-Print
donotprint in template (2 posts)

  1. mdroca
    Member
    Posted 1 year ago #

    Any idea how I can use directly [donotprint] ... [/donotprint] in my single.php template?. I donĀ“t know enought about code.

    Thanks in advance!

    http://wordpress.org/extend/plugins/wp-print/

  2. DPartridge
    Member
    Posted 1 year ago #

    You'll have to use the wordpress function do_shortcode:

    echo do_shortcode('[donotprint]'.$text_to_be_wrapped_in_shortcode.'[/donotprint]');

    Note, the $text_to_be_wrapped_in_shortcode is the text you don't want to print. You can find more in the codex about do_shortcode:

    http://codex.wordpress.org/Function_Reference/do_shortcode

    Dennis

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic