<?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>Todd Halfpenny &#187; widgets</title>
	<atom:link href="http://gingerbreaddesign.co.uk/todd/tag/widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://gingerbreaddesign.co.uk/todd</link>
	<description>Code is Purgatory</description>
	<lastBuildDate>Mon, 21 May 2012 15:50:43 +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 1 Minute Wonder &#8211; Styling Widgets on Pages Horizontally</title>
		<link>http://gingerbreaddesign.co.uk/todd/2011/05/08/wordpress-widgets-on-pages-horizontal-layout-demo/</link>
		<comments>http://gingerbreaddesign.co.uk/todd/2011/05/08/wordpress-widgets-on-pages-horizontal-layout-demo/#comments</comments>
		<pubDate>Sun, 08 May 2011 18:36:03 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[1 Minute Wonder]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://gingerbreaddesign.co.uk/todd/?p=471</guid>
		<description><![CDATA[In this edition of WordPress 1 Minute Wonders I will answer a question which I frequently get emailed about&#8230; and that is how to style widgets next to each other when using my Widgets on Pages WordPress plugin. In this &#8230; <a href="http://gingerbreaddesign.co.uk/todd/2011/05/08/wordpress-widgets-on-pages-horizontal-layout-demo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://gingerbreaddesign.co.uk/todd/category/1-minute-wonder/"><img class="alignnone size-full wp-image-439" title="WordPress One Minute Wonder" src="http://gingerbreaddesign.co.uk/todd/files/2011/04/1minwonder_01.png" alt="WordPress One Minute Wonder" width="344" height="100" /></a></p>
<p>In this edition of <a href="http://gingerbreaddesign.co.uk/todd/category/1-minute-wonder/">WordPress 1 Minute Wonders</a> I will answer a question which I frequently get emailed about&#8230; and that is how to style widgets next to each other when using my <a href="http://wordpress.org/extend/plugins/widgets-on-pages/">Widgets on Pages WordPress plugin</a>.</p>
<p>In this post I have 3 widgets in one of the sidebars created by the plugin. I have named the sidebar <em>horiz</em>.</p>
<div id='horiz' class='widgets_on_page'>
    <ul></ul>
  </div><!-- widgets_on_page -->
<p>To get the Widgets to display as they do above there was some extra CSS that I had to add to my theme&#8217;s style.css file to get them to display like this&#8230; here it is.</p>
<pre>#horiz {
  overflow: auto;margin: 10p;padding: 10px;
}</pre>
<pre>#horiz .widget {
  float: left;
  width: 25%;
  padding: 2%;
  background: #f1f1f1;
  border:1px solid #999;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  -o-border-radius: 10px;
  border-radius: 10px;
  -moz-box-shadow: 3px 3px 7px #999;
  -webkit-box-shadow: 3px 3px 7px #999;
  -o-box-shadow: 3px 3px 7px #999;
  box-shadow: 3px 3px 7px #999;
  margin: 0 1%;
 }</pre>
<p>I have put a fair amount of styling in there to make them look a bit more appealing but essentially the important bit that makes the widgets sit next to each other can be done with just the following;</p>
<pre>#horiz {
  overflow: auto;
}</pre>
<pre>#horiz .widget {
  float: left;
  width: 25%;
  padding: 2%;
  margin: 0 1%;
 }</pre>
<p>In the first section we style the whole sidebar (you would replace <em>.horiz</em> with whatever you had called your sidebar), making sure that the content overflow is set to auto. This makes sure that any content following the sidebar does not also creep up alongside the widgets.</p>
<p>The second section styles the widgets (all three in this case). The key part here is the <em>float:left;</em> which makes them site alongside each other.</p>
<div class="jbox blue" style="background: -webkit-gradient(linear, left top, left bottom, from(#fdfeff), to(#bae3ff));background: -moz-linear-gradient(top, #fdfeff, #bae3ff);filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdfeff', endColorstr='#bae3ff');">  <div  class="jbox-title blue">Found this  useful?</div><div  class="jbox-content">If you&#8217;ve used this tip why not <a href="../feed/">subscribe to my feed</a> or check out the first item in the <a href="../2011/04/23/wordpress-styling-author-comments/">WordPress 1 Minute Wonder series</a>?</div></div>
<p>Thanks for reading, check out <a href="http://gingerbreaddesign.co.uk/todd">Todd Halfpenny</a> for more from Todd Halfpenny</p>]]></content:encoded>
			<wfw:commentRss>http://gingerbreaddesign.co.uk/todd/2011/05/08/wordpress-widgets-on-pages-horizontal-layout-demo/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Advanced WordPress Page Layout Experiment</title>
		<link>http://gingerbreaddesign.co.uk/todd/2010/07/25/advanced-wordpress-page-layout-experiment/</link>
		<comments>http://gingerbreaddesign.co.uk/todd/2010/07/25/advanced-wordpress-page-layout-experiment/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 18:06:17 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[wordpres]]></category>

		<guid isPermaLink="false">http://gingerbreaddesign.co.uk/todd/?p=251</guid>
		<description><![CDATA[<img align="left" src="http://gingerbreaddesign.co.uk/todd/files/2010/07/wop_demo_01-150x150.png" alt="" width="150" height="150" />Styling WordPress page and post layouts can be daunting for the novice&#8230; especially if you don&#8217;t want to dirty your hands with PHP and the like. I wanted to experiment with what was possible to do using only the default &#8230; <a href="http://gingerbreaddesign.co.uk/todd/2010/07/25/advanced-wordpress-page-layout-experiment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img align="left" src="http://gingerbreaddesign.co.uk/todd/files/2010/07/wop_demo_01-150x150.png" alt="" width="150" height="150" /><p>Styling WordPress page and post layouts can be daunting for the novice&#8230; especially if you don&#8217;t want to dirty your hands with PHP and the like. I wanted to experiment with what was possible to do using only the default WordPress theme 2010 and plugins alone (OK, some CSS was needed).</p>
<p>So I set myself the challenge of mirroring something which is a classic layout across news sites and ended up with the perfect example from the BBC News web pages (please someone let me know if I&#8217;m NOT allowed to publish the below pic).</p>
<div id="attachment_252" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-252" title="Extract of the BBC News site, the desired layout" src="http://gingerbreaddesign.co.uk/todd/files/2010/07/wop_demo_02-300x154.png" alt="Extract of the BBC News site, the desired layout" width="300" height="154" /><p class="wp-caption-text">Extract of the BBC News site, the desired layout</p></div>
<p>The desired layout is essentially a main news article with a supporting image followed by a couple of secondary articles and then a listing of tertiary articles.</p>
<p>My initial ideas came from using the Widgets on Pages WorPress plugin that I had developed which allows the addition of sidebar areas to be inserted inline in pages and posts. Using this plugin I was able to essentially define multiple areas in a standard page (using a standard template) which could then have independant content defined and (with some tweaks to the live version of the Widget on Pages plugin) could be styled each in it&#8217;s own way. This, by itself, was limited though as I really needed some mechanism to pull in the desired stories&#8230; I needed something to support it.</p>
<p>Then at the recent <a href="http://2010.wordcampuk.org/">WordCampUK 2010</a> I was lucky enough to be attending <a title="Michael Kimb Jones" href="http://mkjones.co.uk/">Michael Kimb Jones</a>&#8216; presentation on WOW Plugins when the <a href="http://wordpress.org/extend/plugins/query-posts/">Query Posts plugin</a> (by the incredible <a href="http://justintadlock.com/">Justin Tadlock</a>) was brought to my attention. The plugin provides a widget can be set up to be populated with the result of a query against the posts in the database. Kimb actually mentioned that he had thought of producing an entire WordPress site just through widgets&#8230; a very similar one to the train of investigation I was pursuing. This Query Posts plugin was the answer.</p>
<p>I put this plugin to work (with some slight mods to now use WordPress featured image feature) alongside my own Widgets on Pages plugin and some additional CSS to the 2010 theme to come up with a layout that is indeed on the way to what I was after.</p>
<div id="attachment_260" class="wp-caption alignnone" style="width: 310px"><a href="http://gingerbreaddesign.co.uk/todd/files/2010/07/wop_demo_01.png"><img class="size-medium wp-image-260" title="Adv layout with no template messing" src="http://gingerbreaddesign.co.uk/todd/files/2010/07/wop_demo_01-300x205.png" alt="Screenshot of layout" width="300" height="205" /></a><p class="wp-caption-text">Adv layout with no template messing</p></div>
<p>The page content actually consists of only the following content;</p>
<pre>&#91;widgets_on_pages id="featured_news"]
&#91;widgets_on_pages id="also_in_the_news"]</pre>
<p>To support this I have 2 sidebar areas defined (<em>featured_news</em> and <em>also_in_the_news</em>) which each have <em>Query Posts</em> widgets in which pull in the news feed with each one offset to allow idea of one single feed.</p>
<p>The CSS used to stylize these is as follows (yes I know it&#8217;s not clean&#8230; this is an experiment remember);</p>
<pre lang="css">.featured_news {
width:650px;
border: 1px solid grey;
border-width: 0  0 1px 0;
overflow: auto;
padding-bottom: 8px;
}

.also_in_the_news ul li {
float: left;
width:290px;
padding: 0 0 0 0
}

.also_in_the_news  {
margin: 5px 0px 10px 0;
border: 1px solid grey;
border-width: 0  0 1px 0;
overflow: auto;
width:650px;
}

.also_in_the_news ul li:first-child {
float: left;
width:290px;
margin: 0 0px 0 0;
}

.widgets_on_page ul {
list-style: none;
}

.widgets_on_page h2.widgettitle  {
font-size:1.2em;
}

.widgets_on_page h2.post-title a  {
font-size:0.9em;
}

.featured_news h2.post-title a   {
font-size: 1.5em;
}

.widgets_on_page .entry-summary {
clear: both;
padding: 0px 0 0 0;
font-size: 0.8em;
line-height: 1.5em;
font-family: arial;
}

.widgets_on_page  {
font-size:0.9em;
}

.widgets_on_page .hentry  {
margin: 0 0 5px 0;
}

#content .widgets_on_page  p,
#content .widgets_on_page  ul,
#content .widgets_on_page  ol,
#content .widgets_on_page  dd,
#content .widgets_on_page  pre,
#content .widgets_on_page  hr {
margin-bottom:5px;
}

img.attachment-thumbnail {
float: left;
}

.also_in_the_news img.attachment-thumbnail {
display: none;
}

.featured_news .words {
margin: 0 0 0 20px;
clear: none;
float: left;
width: 440px;
}

li.widget li a {
font-family: arial;
text-decoration: none;
font-weight: bold;
font-size: 0.8em;
}

li.widget li ,li.widget li:first-child  {
margin-bottom: 0.8em;
}

li.widget li a:hover {
font-family: arial;
text-decoration: underline;
}</pre>
<p><a href="http://gingerbreaddesign.co.uk/todd/widgets-on-pages-demo/">The demo page</a></p>
<p>Thanks for reading, check out <a href="http://gingerbreaddesign.co.uk/todd">Todd Halfpenny</a> for more from Todd Halfpenny</p>]]></content:encoded>
			<wfw:commentRss>http://gingerbreaddesign.co.uk/todd/2010/07/25/advanced-wordpress-page-layout-experiment/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to display Widgets inside posts and pages</title>
		<link>http://gingerbreaddesign.co.uk/todd/2010/05/09/how-to-display-widgets-inside-posts-and-pages/</link>
		<comments>http://gingerbreaddesign.co.uk/todd/2010/05/09/how-to-display-widgets-inside-posts-and-pages/#comments</comments>
		<pubDate>Sun, 09 May 2010 19:02:11 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sidebars]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://gingerbreaddesign.co.uk/todd/?p=187</guid>
		<description><![CDATA[<img align="left" src="http://gingerbreaddesign.co.uk/todd/files/2010/05/screenshot-2-150x150.png" alt="" width="150" height="150" />I was faced the need to be able to place extra manageable content inside a wordpress page&#8217;s core content&#8230; and without an existing plugin available to do this I thought I&#8217;d write one of my own. The output was the Widgets on Pages &#8230; <a href="http://gingerbreaddesign.co.uk/todd/2010/05/09/how-to-display-widgets-inside-posts-and-pages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img align="left" src="http://gingerbreaddesign.co.uk/todd/files/2010/05/screenshot-2-150x150.png" alt="" width="150" height="150" /><p>I was faced the need to be able to place extra manageable content inside a wordpress page&#8217;s core content&#8230; and without an existing plugin available to do this I thought I&#8217;d write one of my own.</p>
<p>The output was the <a title="Widgets on Pages plugin" href="http://wordpress.org/extend/plugins/widgets-on-pages/">Widgets on Pages</a> wordpress plugin which is at time of writing at version 0.0.4. The plugin basically allows the author to add a shortcode to their wordpress page or post which will then add the content of a predefined Widget area (or sidebar) at that point in the post/page</p>
<div id="attachment_200" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-200" title="Widgets on Pages" src="http://gingerbreaddesign.co.uk/todd/files/2010/05/screenshot-2-300x210.png" alt="" width="300" height="210" /><p class="wp-caption-text">Widgets on Pages Options</p></div>
<p>The plugin approach allows the user to add a lot of extra control to their wordpress sites without the need for any coding or markup skills (PHP, MySQL, HTML etc).</p>
<p><strong>UPDATE: </strong>In version 0.0.4 you are able to define an unlimited number of separate sidebars and call these all separately within the wordpress content.</p>
<p>Thanks for reading, check out <a href="http://gingerbreaddesign.co.uk/todd">Todd Halfpenny</a> for more from Todd Halfpenny</p>]]></content:encoded>
			<wfw:commentRss>http://gingerbreaddesign.co.uk/todd/2010/05/09/how-to-display-widgets-inside-posts-and-pages/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
