<?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>Robert Naylor &#187; WordPress</title>
	<atom:link href="http://robert.pobice.co.uk/cats/software/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://robert.pobice.co.uk</link>
	<description>Random thoughts and tech tips</description>
	<lastBuildDate>Sun, 08 Jan 2012 12:20:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress: Stopping the Sidebar from Printing</title>
		<link>http://robert.pobice.co.uk/2009/08/wordpress-stopping-the-sidebar-from-printing-2/</link>
		<comments>http://robert.pobice.co.uk/2009/08/wordpress-stopping-the-sidebar-from-printing-2/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 21:18:04 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://robert.pobice.co.uk/?p=51</guid>
		<description><![CDATA[I&#8217;ve already blogged about this, but here&#8217;s a new method on how to fix the problem. This one doesn&#8217;t bloat the site as much, and keeps the css files down to a minimum. Please note: I&#8217;m assuming you still use the default theme. Things will be slightly different with other themes, but in general the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve already blogged about this, but here&#8217;s a new method on how to fix the problem.  This one doesn&#8217;t bloat the site as much, and keeps the css files down to a minimum.</p>
<p><strong>Please note: I&#8217;m assuming you still use the default theme.  Things will be slightly different with other themes, but in general the same principal should apply.</strong></p>
<p>In the file header.php remove media=&#8221;screen&#8221; from the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;</pre></div></div>

<p>In style.css, just before the line</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Begin Typography &amp;amp; Colors */</span></pre></div></div>

<p>Add</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@media screen {</span></pre></div></div>

<p>At the bottom of the file add the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">&#125;</span>
<span style="color: #a1a100;">@media print {</span>
    <span style="color: #808080; font-style: italic;">/* style sheet for print goes here */</span>  
   <span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Bingo no wasted paper from printing the side bar.</p>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2009/08/wordpress-stopping-the-sidebar-from-printing-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Stopping the Sidebar from Printing</title>
		<link>http://robert.pobice.co.uk/2007/05/wordpress-stopping-the-sidebar-from-printing/</link>
		<comments>http://robert.pobice.co.uk/2007/05/wordpress-stopping-the-sidebar-from-printing/#comments</comments>
		<pubDate>Wed, 09 May 2007 21:46:00 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.pobice.co.uk/index/archives/2007/05/35</guid>
		<description><![CDATA[If there&#8217;s one thing that really winds me up on the net is that when printing web-pages you end up with a load of crap you didn&#8217;t want usually. For example with blogs you usually get a page or two with the content on the blog sidebar, which frankly I don&#8217;t need on a print [...]]]></description>
			<content:encoded><![CDATA[<p>If there&#8217;s one thing that really winds me up on the net is that when printing web-pages you end up with a load of crap you didn&#8217;t want usually.  For example with blogs you usually get a page or two with the content on the blog sidebar, which frankly I don&#8217;t need on a print out.</p>
<p>Well I&#8217;ve done something about it (well at least on my blog) &#8211; I&#8217;ve changed my theme so that on browsers that supports css and media types the sidebar shouldn&#8217;t print out.  Here&#8217;s how you can add this to you&#8217;re WordPress blog</p>
<ol>
<li>Create a file print-style.css in the directory for you&#8217;re current theme with the following content<br />
<code> .dontprint{ display: none; }<br />
div#menu{ display: none; }</code></li>
<li>In wordpress, goto Presentation, Theme Editor and select the file Header</li>
<li>Just bellow the line setting the css style sheet &#8211; should be something like this :<br />
<code>&amp;lt;style type="text/css" media="screen"&gt;<br />
@import url( %lt;?php bloginfo('stylesheet_url'); ?&gt; );<br />
&lt;style&gt;<br />
</code><br />
add the lines<br />
<code> &amp;lt;style type="text/css" media="print"&gt;<br />
@import url(&amp;lt;?php bloginfo('template_directory'); ?&gt;/style-print.css);<br />
&lt;/style&gt;</code></li>
<li>Hopefully this should be enough, but if the theme author hasn&#8217;t used the div&#8217;s in the sidebar file you may have to add this line <code>&lt;div id="menu"&gt;</code> to the top of the file and this line <code>&lt;/div&gt;</code> to the bottom of the file</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2007/05/wordpress-stopping-the-sidebar-from-printing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

