• i make a shortcode.php to put my shortcode on it .
    and i included it in function.php , but when i try to enter to any page an error appear :

    Parse error: syntax error, unexpected ')', expecting '{' in C:\xampp\htdocs\wordpress\wp-content\themes\twentyeleven\shortcode.php on line 2

    the shortcode.php file :
    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi dagash, based upon the syntax error, this should be a relatively easy fix. As the moderator suggested, use pastebin and provide us a link to the code, and I’ll be happy to review further for you.

    Thread Starter dagash

    (@dagash)

    http://pastebin.com/eVPngR22
    ok , check this …

    Hi dagash, I may have to bite my tongue on this one as taking a quick look at your code, the syntax all appears correct to me.

    I took a quick look back at the Function Reference/add shortcode and noticed you’re using the add_shortcode function in a manner that wasn’t provided as an example. For example, you’re declaring the function as the second parameter while none of the examples do that.

    Have you successfully used add_shortcode in the manner that you’re using it in now? You may want to try declaring the function outside of the add_shortcode function itself.

    Thread Starter dagash

    (@dagash)

    ok i will try then back ,..

    thanks BRAD .. ^_^

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘error on shortcode.php’ is closed to new replies.