WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have other short codes that are built in this fashion and I cant figure out what i did between them and this one, This short code is used as such: [code code="function(){}"] to wrap your input in <code></code> tags, great for something super simple.

the issue is:

function aisis_inline_code($atts, $content = null){
    extract (
        shortcode_atts (
            array (
                'code' => 'test?'
    return '<code>'.$code.'</code>';

add_shortcode( 'code', 'aisis_inline_code');

The above renders out test wrapped in code tags instead of the content I put in which is: [code code="function(){}"]

How do we debug these? This was working pre WordPress 3.7.1, not it seems all it wants to do is out put test?. I checked the spelling of the short code spelling a hundred times. ...

share|improve this question
a copy/paste of your code and example shortcode work as expected for me. – Milo Oct 31 '13 at 19:52

I checked your solution (copy and paste) and it is working fine in Wordpress 3.7.1 Maybe check your post again. Can you provide a link to your site? (can not comment yet, thats why I answer)

share|improve this answer
@TheWebs It works fine for me too tested in Wordpress 3.7.1 – rahilwazir Oct 31 '13 at 20:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.