139 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 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.

1028 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 500 and 999 users
+1 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]
2566 posts Put a Donk On It
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • United Kingdom
  • Exclusive Author
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Referred between 200 and 499 users
+5 more
ThemeProvince says

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

139 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 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

by
by
by
by
by
by