Title: Function code incorrect
Last modified: August 20, 2016

---

# Function code incorrect

 *  Resolved [jstatondesigns](https://wordpress.org/support/users/jstatondesigns/)
 * (@jstatondesigns)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/)
 * Just thought I’d let you know that the code generated to add to a template file
   has incorrect syntax and causes the slider to not work. Basically, it’s missing
   a curly bracket. See example
 * Provided code
    if ( function_exists( ‘soliloquy_slider’ ) ) soliloquy_slider(’
   82’ );
 * Needs to be
    if (function_exists(‘soliloquy_slider’)) { soliloquy_slider(’82’);
 * This could cause some people to think that the plugin is broken, but once the
   syntax is corrected, it works great. Thanks.
 * [http://wordpress.org/extend/plugins/soliloquy-lite/](http://wordpress.org/extend/plugins/soliloquy-lite/)

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

 *  [Thomas Griffin](https://wordpress.org/support/users/griffinjt/)
 * (@griffinjt)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145273)
 * There is nothing wrong with that code. The syntax is correct. You don’t need 
   braces for one liners like that.
 *  Thread Starter [jstatondesigns](https://wordpress.org/support/users/jstatondesigns/)
 * (@jstatondesigns)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145283)
 * If I remove the bracket, the page goes completely blank and no code is generated.
   I have the function in my header file and thought that maybe that could be the
   issue, so I put it in one of my page templates instead and I got a server error.
   Once I added the bracket – everything worked just fine.
 *  [Thomas Griffin](https://wordpress.org/support/users/griffinjt/)
 * (@griffinjt)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145289)
 * You may need to wrap it in opening (<?php) and closing (?>) php tags then, but
   there is nothing wrong with the syntax.
 *  Thread Starter [jstatondesigns](https://wordpress.org/support/users/jstatondesigns/)
 * (@jstatondesigns)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145293)
 * Yes, I have the opening and closing tags in my file, I was just referencing the
   supplied code in my post. It’s working with the bracket so I’m good. I just wanted
   to put this out there in case anyone else ran into the same issue.
 *  [Thomas Griffin](https://wordpress.org/support/users/griffinjt/)
 * (@griffinjt)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145296)
 * If you are adding just one bracket, then your code has an error somewhere else.
   You should turn on error reporting to see where the missing bracket lies.
 *  Thread Starter [jstatondesigns](https://wordpress.org/support/users/jstatondesigns/)
 * (@jstatondesigns)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145299)
 * my bad – here’s the full line of code
    `<?php if (function_exists('soliloquy_slider')){
   soliloquy_slider('82'); }?>`

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

The topic ‘Function code incorrect’ is closed to new replies.

 * ![](https://ps.w.org/soliloquy-lite/assets/icon-256x256.png?rev=979373)
 * [Slider by Soliloquy - Responsive Image Slider for WordPress](https://wordpress.org/plugins/soliloquy-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/soliloquy-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/soliloquy-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/soliloquy-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/soliloquy-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/soliloquy-lite/reviews/)

## Tags

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

 * 6 replies
 * 2 participants
 * Last reply from: [jstatondesigns](https://wordpress.org/support/users/jstatondesigns/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/function-code-incorrect/#post-3145299)
 * Status: resolved