11 January 2012

How to add code to a post as text

I came across a problem when I was publishing my first 'how to' post' (How to add a recipe index to your blog). The code I was publishing for other bloggers to use was turning into it's function (ie a drop down list style index) instead of just text for bloggers to copy and paste.

After a search on google proved fruitless, I popped onto twitter and put out a call for help. Monica over at SmarterFitter was able to help me and with a wee tweek it eventually worked.

Here is what to do:

1. Each time you have a < in your code, replace it with

2. Each time you have a > in your code, replace it with


Another tip from Helen over at Fuss Free Flavours:

If you are emailing people html, send it in a wordpad document. A wordprocessor can add formatting which can stop it working.

9 comments:

  1. Another very useful tip is if you are mailing people html, send it in a wordpad document. A wordprocessor can add formatting which can stop it working.

    ReplyDelete
  2. Sounds very technical. Can you now code my blog to have better photographs? :-p

    ReplyDelete
  3. As if you need help with photos Scott:)

    ReplyDelete
  4. Had to read that about three times before I understood it, it's too late at night for me (10pm) how sad am I???

    ReplyDelete
  5. thanks for this - I was trying to work this out when I wrote a post recently about anchors and resorted to cropping screenshots but this sounds much more sensible

    ReplyDelete

I love reading comments, so thank you for taking the time to leave one. Unfortunately, I'm bombarded with spam, so I've turned on comment moderation. I'll publish your comments as soon as I can and respond to them. Don't panic, they will disappear when you hit publish. Jac x

LinkWithin

Related Posts Plugin for WordPress, Blogger...