Need help? Check out our Support site, then


How can I post formatted source code?

  1. I need to post code like it is done for example in http://igrali.wordpress.com/2011/08/30/how-to-use-the-expanderview-control/ .
    My blog is made using the wordpress.com installation and not using a my server.

    I saw some similar questions in wordpress.org but I suppose they are related to personal installation of wordpress and specific entries in configuration files.

    I have tried to follows the tutorial http://en.support.wordpress.com/code/posting-source-code/

    inserting

    [sourcecode language="csharp"]
    your code here
    [/sourcecode]

    but these lines are shown as they are in the final post!!!

    Alternatively, is there some code snippet that produce the appropriate html text from a input string?

    The blog I need help with is adozionigiuste.wordpress.com.

  2. My blog is made using the wordpress.com installation and not using a my server.

    May we have the address, please?

  3. Sure ... but I don't konow how it can be useful to answer my question :-) !!!

    My blog is in http://enzocontini.wordpress.com/ and the way I would like to post my code examples is the one used for example in this wordpress blog page http://igrali.wordpress.com/2011/08/30/how-to-use-the-expanderview-control/ .

    In my blog, for the time being, I used the tag but the indentation and the visibility of the code is not very usser friendly!!!!</p> <p>Hoping in an answer ....</p> <p>Ciao<br /> Enzo

  4. We need the link to the site to make sure you are actually hosted here at wordpress.COM. There are too many times that people swear they are hosted here, but they are not and we go round and round trying to get something to work only to find out they are not hosted here. Many things here at wordpress.COM are different than on self-hosted wordpress sites so the answers here are in general not correct on a self-hosted site. For example, the following solution for posting source code will not work on a self-hosted site.

    http://en.support.wordpress.com/code/posting-source-code/

  5. Thank you for your answer.
    I tried as I said in my first post, the method suggested in the link you provided putting in my Visual text the suggested pattern

    [sourcecode language="csharp"]
    your code here
    [/sourcecode]

    but in tha past, at least when I ask for a preview of the page before a real post, the text display exactly that characters instead of formating the code.

    NOW, after your post, I tried again and it succeded!!!???!!! Perhaps I made some typing error in the past ... I didn't changed any options in my blog: did you?

    Thank you very much for your quick support anyway ;-)

    I like wordpress and I find it very easy to handle!!!

    Kind regards
    Enzo

  6. You are welcome.

    I always put the sourcecode tags and the source code in while in the HTML tab in the editor. Shortcodes always work that way for me, but not always when I put them in in the visual tab in the editor. It shouldn't matter, but it does sometimes.

Topic Closed

This topic has been closed to new replies.

About this Topic