Title: shortcode linebreak
Last modified: August 21, 2016

---

# shortcode linebreak

 *  Resolved [Michael](https://wordpress.org/support/users/taloscent/)
 * (@taloscent)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/shortcode-linebreak/)
 * Hello,
    I have created a snippet that makes use of a shortcode. When I use the
   shortcode there is an extra linebreak before and after the shortcode. Is this
   something related to how the snippet is read/used?
 * [http://wordpress.org/plugins/code-snippets/](http://wordpress.org/plugins/code-snippets/)

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

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025594)
 * Have you tested this code directly in a plugin or in functions.php to see if 
   you receive the same result? Can you post your code here so I can chech if it’s
   causing the issue?
 *  Thread Starter [Michael](https://wordpress.org/support/users/taloscent/)
 * (@taloscent)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025702)
 * I place the following code in the functions.php
 * function TuitionRateShortcode() {
    return ‘<p>$2.00</p>’; } add_shortcode(‘tuitionrate’,‘
   TuitionRateShortcode’);
 * Here is the shortcode in use:
 * The current tuition rate is [tuitionrate]. This rate may change from year to 
   year.
 * Here is what I get:
 * The current tuition rate is
 * $2.00
 * . This rate may change from year to year.
 *  [solhuebner](https://wordpress.org/support/users/solhuebner/)
 * (@solhuebner)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025713)
 * Hi.
 * This is due to the <p></p> in your function as it creates a paragraph 🙂
 * Have a look at this [website](http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_paragraphs1)
   for an example.
 * Kind regards
 *  Thread Starter [Michael](https://wordpress.org/support/users/taloscent/)
 * (@taloscent)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025714)
 * Fixed thank you!
 *  [solhuebner](https://wordpress.org/support/users/solhuebner/)
 * (@solhuebner)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025715)
 * You are welcome 🙂
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025716)
 * Thanks for helping out solhuebner. I would have answered this thread sooner, 
   except the `<p>` tags from the question were not showing up in the email notification,
   and I thought that must be a different issue.
 *  [solhuebner](https://wordpress.org/support/users/solhuebner/)
 * (@solhuebner)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025717)
 * It is great that you support your plugin so well but I thought it is a good idea
   to help out when I can as you devs have a lot to do 🙂 And I really like your
   plugin! It is way easier to handle all that little code snippets used 🙂

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

The topic ‘shortcode linebreak’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

## Tags

 * [linebreak](https://wordpress.org/support/topic-tag/linebreak/)
 * [shotcode](https://wordpress.org/support/topic-tag/shotcode/)

 * 7 replies
 * 3 participants
 * Last reply from: [solhuebner](https://wordpress.org/support/users/solhuebner/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-linebreak/#post-4025717)
 * Status: resolved