SourceCode Tags not working

  • Unknown's avatar

    Hi

    I created an empty blog on wordpress.com to start blogging code and learning how to use wordpress properly I never figured out how to post source code. I’m keen to get a coding blog started but found that only self-hosted wordpress.org users can use source-code plug-ins.

    Then I came across this post: GetDocuments(GetDocumentsRequestType requestType); IList<DeletedDocumentDTO> GetDeletedDocuments(); } }”>Posting Source Code

    Which seems to indicate you are able to use a [sourcecode] tag to post code.

    I tried that but when I add somethign like the below in my post it doesn’t work at all, it actually just shows the text in the preview as I typed it including the tags and no code formatting occured. Why is that? Did I missinterpet the post and the tag is not for wordpress.com users at all?
    (The blow shows up exactly like this in the post without code formatting happening)

    [sourcecode language="csharp"]
    namespace SomeNameSpace
    {
    public interface IInterface
    {
    IList<SomeObject> GetObjects();
    IList<SomeOtherObject> GetOrtherObjects();
    }
    }
    [/sourcecode]

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Great i screwed up the link-name in the post and can’t edit…why no edit?
    Link is suppose to bring you here:
    http://en.support.wordpress.com/code/posting-source-code/

  • Unknown's avatar

    Never mind, I found that when I copy my c# code into notepad first and then from notepad to wordpress it starts working. Doesn’t work copying from visual stuido straight into wordpress with is strange. Anyway, on a side note,..no preview option when writing a new support topic is bad, no edit or delete is also bad. Delete I can understand for archiving purposes, but add a edit option please!

  • Unknown's avatar

    ..no preview option when writing a new support topic is bad

    You can see if the quote, strong or any shortcode assigned well by clicking, “Check spelling”, at the top of this comment box, to avoid any typo.

  • The topic ‘SourceCode Tags not working’ is closed to new replies.