152 posts Get in the spotlight
  • Has been part of the Envato Community for over 4 years
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
  • Has collected 10+ items on Envato Market
+7 more
FamousThemes says

Could some one give me a little help here :)

I have the simple shortcode:

function services_box( $atts, $content = null) 

{ 

 extract(shortcode_atts(array( 

        'title'      => '', 

        ), $atts));

   return '<div class="services_content"><h6>'.$title.'</h6><p>'. do_shortcode($content) . 

 '</p></div>'; 

} 

add_shortcode('service', 'services_box'); 

Adding in editor the following:

[service title=Ut enim ad minim veniam] Sed do eiusmod tempor incididunt ut labore et Ut enim ad minim veniam, quis nostrud. [/service]

The problem is that the TITLE it shows only the first word from my phrase “Ut”, and stops when the space comes.

Ut

Sed do eiusmod tempor incididunt ut labore et Ut enim ad minim veniam, quis nostrud.

Does anyone knows how to fix the space issue?

Thanks.

1029 posts
  • Has referred 500+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 more
ThemeBlvd says

Have you tried using quotes?

[service title="Ut enim ad minim veniam"] Sed do eiusmod tempor incididunt ut labore et Ut enim ad minim veniam, quis nostrud. [/service]
2588 posts Put a Donk On It
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has sold $250,000+ on Envato Market
+10 more
ThemeProvince says

You know you should have your short atts in double quotes. Like Jason said above ^

152 posts Get in the spotlight
  • Has been part of the Envato Community for over 4 years
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
  • Has collected 10+ items on Envato Market
+7 more
FamousThemes says

Problem fixed.

Damn that was simple :), quotes fixed it. I gues I am really tired forgeting about the quotes.

Thanks ThemeBlvd and Phoenix

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by