<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>PHP Architect blog &#187; WordPress</title>
	<atom:link href="http://www.php-architect.com/blog/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.php-architect.com/blog</link>
	<description>me, myself, and my code</description>
	<lastBuildDate>Wed, 14 Sep 2011 12:50:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to highlight code in wordpress posts</title>
		<link>http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-highlight-code-in-wordpress-posts</link>
		<comments>http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 08:47:42 +0000</pubDate>
		<dc:creator>aibrahim</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[geshi]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[syntax]]></category>
		<guid isPermaLink="false">http://www.abdelaliem.com/blog/?p=22</guid>
		<description><![CDATA[<a href="http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/" title="How to highlight code in wordpress posts"></a>well, to highlight the code in your posts in wordpress, you need to download the plugin http://wordpress.org/extend/plugins/wp-syntax/ after you install it as in the instructions, go to the admin panel then plugins, and activate the plugin, then go to Presentation &#8230;<p class="read-more"><a href="http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/" title="How to highlight code in wordpress posts"></a><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><p>well, to highlight the code in your posts in wordpress, you need to download the plugin</p>
<p><a href="http://wordpress.org/extend/plugins/wp-syntax/" target="_blank">http://wordpress.org/extend/plugins/wp-syntax/</a></p>
<p>after you install it as in the instructions,</p>
<p>go to the admin panel then plugins, and activate the plugin, then go to Presentation -&gt; Theme Editor , then choose from the menu on the right &#8220;Stylesheet&#8221; this will allow you to edit the file Style.css of your theme,</p>
<p>paste the following code in the end of it</p>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">pre <span style="color: #00AA00;">&#123;</span>  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Monaco<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Courier New&quot;</span><span style="color: #00AA00;">,</span> Courier<span style="color: #00AA00;">,</span> <span style="color: #993333;">monospace</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span><span style="color: #6666ff;">.wp_syntax</span> <span style="color: #00AA00;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#100</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f9f9f9</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">silver</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1.5em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* IE FIX */</span>
&nbsp;
<span style="color: #6666ff;">.wp_syntax</span> <span style="color: #00AA00;">&#123;</span>
&nbsp;
overflow-x<span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
&nbsp;
overflow-y<span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> expression<span style="color: #00AA00;">&#40;</span>this<span style="color: #6666ff;">.scrollWidth</span> &amp;gt<span style="color: #00AA00;">;</span> this<span style="color: #6666ff;">.offsetWidth</span> ? <span style="color: #cc66cc;">15</span> <span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.wp_syntax</span> table <span style="color: #00AA00;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">collapse</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.wp_syntax</span> div<span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.wp_syntax</span> td <span style="color: #00AA00;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.wp_syntax</span> <span style="color: #6666ff;">.line_numbers</span> <span style="color: #00AA00;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#def</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* potential overrides for other styles */</span>
&nbsp;
<span style="color: #6666ff;">.wp_syntax</span> pre <span style="color: #00AA00;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>
<p>then save the file, and whenever you want to write a code; write it as follow</p>
<p>&lt;pre line=&#8221;1&#8243; lang=&#8221;java&#8221;&gt;<br />
your code here&lt;/pre&gt;</p>
<p>where java is the attribute of the code language</p>
<p>here is the full lists of attributes supported by this language</p>
<p>abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80</p>
<p>and enjoy the colors <img src='http://www.php-architect.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-architect.com/blog/2008/01/08/how-to-highlight-code-in-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

