• I have two WP installed, 2.5.1 on my local windows machine… 2.5 on a shared linux server… Both are freshly installed w/o problems.

    But I just can’t get the shortcode to work… I’m very new to WP, I guess I must miss something. Although google didn’t help me much…

    I tried 2 shortcodes in both visual and html modes.. they just showed up as text… I can only scratch my head….

    [youtube=http://www.youtube.com/watch?v=_RyodnisVvU]

    [sourcecode language='csharp']
    private void btnUpload_Click(object sender, EventArgs e)
    {
    status.Items.Add(“error: no device found!”);
    }[/sourcecode]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Vaughan

    (@vaughan-van-dyk)

    Hi,

    Using shortcodes can be tricky and if you’re new to WordPress, I would suggest holding off on using them just yet.

    That said, you will first need to ensure you create your shortcode function code and then associate a shortcode with that function using the add_shortcode function. Only then will you be able to successfully use the shortcode in your posts and pages.

    I haven’t really used this feature myself, but there are two tutorials/overviews that you’ll want to read here and here.

    Hope that helps.
    Vaughan

    Jym, it has taken me literally DAYS to find this thread.

    Vaughan, thank you for coming up with what I suspected was the answer – that shortcodes don’t ‘just work’; that you have to do all kind of complicated things (function code) that would leave a newcomer to WP reaching for his coat.

    I love WP but I hate this aspect of it:

    • newcomer wants to put a single category of post on a page
    • spends days searching until he finds ‘list category post’ plugin
    • installs plugin expecting it do DO something??
    • spends days doing what Jym was doing wondering why it doesn’t work
    • spends more days discovering that you can’t just use ‘shortcodes’
    • walks away thinking all I want is some code to display posts from one category… how hard can it be???

    Answer, very hard – impossibly so for a relative newcomer.

    newcomer wants to put a single category of post on a page…
    …walks away thinking all I want is some code to display posts from one category… how hard can it be???

    It depends on whether or not you are looking for a point and click solution.

    http://codex.wordpress.org/Category_Templates#What_categories_do_you_show_to_the_visitors.3F

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘shortcode not working at all’ is closed to new replies.