4 Replies - 8332 Views - Last Post: 28 May 2012 - 10:16 PM

#1 indyarocks  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 104
  • Joined: 07-March 12

How to put codetag in wordpress ?

Posted 28 May 2012 - 01:03 PM

Hi,

I have started blogging my C++ code as an archive for my future reference. I want to put my code in
statement 1;
statement2;

format. Also, indented code gets published in a plain left aligned format. Proper indention doesn't appear, even when I'm pasting my indented code.
I don't see any such option in wordpress editor. How to put them in my blog ? I'm using online version of wordpress. No local server and all.

Thanks,
Indy

This post has been edited by indyarocks: 28 May 2012 - 01:05 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How to put codetag in wordpress ?

#2 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1291
  • View blog
  • Posts: 2,859
  • Joined: 30-January 11

Re: How to put codetag in wordpress ?

Posted 28 May 2012 - 01:11 PM

Install a plugin for it. A quick search turned up a load of possiblities -

Syntax Highlighter
Was This Post Helpful? 0
  • +
  • -

#3 floppyspace  Icon User is offline

  • D.I.C Regular

Reputation: 48
  • View blog
  • Posts: 254
  • Joined: 04-February 10

Re: How to put codetag in wordpress ?

Posted 28 May 2012 - 07:12 PM

View PostRyano121, on 29 May 2012 - 04:11 AM, said:

Install a plugin for it. A quick search turned up a load of possiblities -

Syntax Highlighter


I was using this one for a time until I started posting code that had more than one function in the page and it did strange things (made code go to all one line, showed the anchors,etc)

I have not had issues with this one, has a lot more support and options for displaying code in different styles.

This post has been edited by floppyspace: 28 May 2012 - 07:15 PM

Was This Post Helpful? 0
  • +
  • -

#4 indyarocks  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 104
  • Joined: 07-March 12

Re: How to put codetag in wordpress ?

Posted 28 May 2012 - 09:54 PM

Thanks for the info guys. The thing here is, I'm not hosting a site, I'm using the wordpress simple blog, as we have blogspot etc. Can you please let me know, how can I use this plugin for online blogging?
Was This Post Helpful? 0
  • +
  • -

#5 indyarocks  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 104
  • Joined: 07-March 12

Re: How to put codetag in wordpress ?

Posted 28 May 2012 - 10:16 PM

Got it guys. Here it is. Thank you. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1