WordPress.org

Ready to get started?Download WordPress

Forums

shortcode not working at all (4 posts)

  1. jym
    Member
    Posted 5 years ago #

    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]

  2. Vaughan
    Member
    Posted 5 years ago #

    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

  3. mukaumedia
    Member
    Posted 5 years ago #

    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.

  4. ClaytonJames
    Member
    Posted 5 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags