<?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>Heatherstone &#187; Woo Themes</title>
	<atom:link href="http://www.heatherstone.com/category/woo-themes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.heatherstone.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Sep 2010 17:04:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Use Separate Event Booking Forms in Diarise by Woo Themes</title>
		<link>http://www.heatherstone.com/how-to-useseparate-event-booking-forms-in-diarise-by-woo-themes/</link>
		<comments>http://www.heatherstone.com/how-to-useseparate-event-booking-forms-in-diarise-by-woo-themes/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 19:22:07 +0000</pubDate>
		<dc:creator>Heatherstone</dc:creator>
				<category><![CDATA[Woo Themes]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Diarise]]></category>

		<guid isPermaLink="false">http://www.heatherstone.com/?p=240</guid>
		<description><![CDATA[Use Diarise by Woo Themes, but include a separate event booking form for each event.  In this article, we walk you through the code changes to make this happen.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.heatherstone.com/content/uploads/book-tickets1-300x159.png" alt="" title="book-tickets" width="300" height="159" class="alignleft size-medium wp-image-247" />By default, the <a href="http://www.woothemes.com/2010/04/diarise/">Diarise theme</a> by <a href="http://www.woothemes.com">Woo Themes</a>, allows you to specify a single event booking form throughout the site.  You do this via the Diarise | Theme Options | Booking Form settings within your WordPress dashboard.</p>
<p>For our <a href="http://www.thinkspinner.com">Thinkspinner Innovation</a> site, though, we needed each event to have it&#8217;s own booking form, since we&#8217;re using <a href="http://www.guestlistapp.com/">Guest List</a>.  The same would be true if you were using <a href="http://www.eventbrite.com">EventBrite</a> or some other external ticketing or registration tool.</p>
<p>Digging into the theme, it turns out to be not that hard to add this as an option.  My hope, of course, is that when I bring this solution to the attention of the Woo Theme team, they will update Diarise to include this option.</p>
<p>There are three files in the theme that need update to support the change. First, we need to make the option available in the Theme Options | Booking Form section.</p>
<p>Open the file includes/theme-options.php and change line 33 to this:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$options_bookings = array(&quot;disabled&quot; =&gt; &quot;Disabled&quot;,&quot;bookingform&quot; =&gt; &quot;Use Booking Form&quot;,&quot;bookingurl&quot; =&gt; &quot;Use External Booking URL&quot;,&quot;postbypost&quot; =&gt; &quot;Use URL Given in Post&quot;);</div></td></tr></tbody></table></div>
<p>That gives us a fourth radio button to select that activates the option.  Next we need to be able to provide that URL in the post, which means updating the Woo options box in the post.  Still in includes/theme-options.php, add the following code, starting on line 558:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">&quot;event_booking_form&quot;</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a> <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;name&quot;</span> &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;event_booking_form&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;std&quot;</span> &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;label&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Event Booking Form&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;type&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;text&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;desc&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Enter the external booking form for the event&quot;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></td></tr></tbody></table></div>
<p>Save and close that file.  You can now go to an event post and within that box provide the URL for your external booking form specific to that event.</p>
<p>Next, there are two places where we need to update the display &#8211; on the home page in the featured events area and in the header on the event&#8217;s own post display.  In both places, there&#8217;s a button &#8220;Book Tickets&#8221; that should go to the newly specified URL.</p>
<p>For the home page, open includes/events-calendar.php.  You&#8217;ll be replacing lines 716-718 of that file:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$woo_booking_form</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'disabled'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$woo_booking_form</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'bookingurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$woo_booking_form_external_url</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$woo_booking_form_page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/?event_id='</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; class=&quot;button book-tickets&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Book Tickets'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woothemes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Delete that code and replace it with this instead:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$woo_booking_form</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'disabled'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Do nothing</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'bookingurl'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$woo_booking_form_external_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; class=&quot;button book-tickets&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Book Tickets'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woothemes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'bookingform'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$woo_booking_form_page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/?event_id='</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; class=&quot;button book-tickets&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Book Tickets'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woothemes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'postbypost'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$event_booking_form</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'event_booking_form'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$event_booking_form</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; class=&quot;button book-tickets&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Book Tickets'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woothemes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Save and close that file.  We also have to update the event page itself, so open single.php.  Delete lines 91-93 of that file, which are the same three lines as appear in events-calendar.php as shown above, and replace them with the same block of code I just shared with you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heatherstone.com/how-to-useseparate-event-booking-forms-in-diarise-by-woo-themes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An Easier Way to Place Buttons in the Coffee Break Slider</title>
		<link>http://www.heatherstone.com/an-easier-way-to-place-buttons-in-the-coffee-break-slider/</link>
		<comments>http://www.heatherstone.com/an-easier-way-to-place-buttons-in-the-coffee-break-slider/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 20:17:12 +0000</pubDate>
		<dc:creator>Heatherstone</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Woo Themes]]></category>

		<guid isPermaLink="false">http://www.heatherstone.com/?p=54</guid>
		<description><![CDATA[I really don't like to require my clients to switch into HTML view when editing posts or pages. So when I saw what was required to put buttons on the sliders, I immediately thought to build a shortcode to make it easier.]]></description>
			<content:encoded><![CDATA[<p>I really don’t like to require my clients to switch into HTML view when editing posts or pages. So when I saw what was required to put buttons on the sliders, I immediately thought that a shortcode that would place buttons more easily would be really nice. So, I wrote one. Now I think that sharing it would also be nice.</p>
<p>Check it out.</p>
<p>First, drop this code into includes/theme-functions.php just before the ?&gt; that ends the PHP statements:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> slider_button_shortcode<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/extract"><span style="color: #990000;">extract</span></a><span style="color: #009900;">&#40;</span> shortcode_atts<span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'count'</span> <span style="color: #339933;">=&gt;;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'url'</span> <span style="color: #339933;">=&gt;;</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;;</span> <span style="color: #0000ff;">'Label'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'delimiter'</span> <span style="color: #339933;">=&gt;;</span> <span style="color: #0000ff;">'or'</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000088;">$urls</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|'</span><span style="color: #339933;">,</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$labels</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|'</span><span style="color: #339933;">,</span><span style="color: #000088;">$label</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$count</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;a class=&quot;button&quot; href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$urls</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;&lt;span&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$labels</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/span&gt;&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&gt;;</span><span style="color: #000088;">$count</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;span class=&quot;middle&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$delimiter</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/span&gt; '</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sliderbutton'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'slider_button_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Now that you’ve done that, on a page used as a slider, instead of the HTML mentioned in the theme documentation, use a shortcode, which you can place whether you’re in visual view or HTML view.</p>
<p>By default, use this:</p>
<div class="codecolorer-container php vibrant" style="overflow: auto; white-space: nowrap;">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="line-numbers">
<div>1</div>
</td>
<td>
<div class="php codecolorer" style="white-space: nowrap;"><span class="br0">[</span>sliderbutton<span class="br0">]</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<p>That’s not very interesting, though, because the URL is simple “#” and the button’s label is “Label”. It’s good enough, though, if you’re just fleshing out the look of the site.</p>
<p>For a single button, use this:</p>
<div class="codecolorer-container php vibrant" style="overflow: auto; white-space: nowrap;">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="line-numbers">
<div>1</div>
</td>
<td>
<div class="php codecolorer" style="white-space: nowrap;"><span class="br0">[</span>sliderbutton url<span class="sy0">=</span><span class="st0">"/try"</span> label<span class="sy0">=</span><span class="st0">"Try Now"</span><span class="br0">]</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<p>That will create a button that will go the page with the slug “try” (that is, like http://www.example.com/try) and the button will have Try Now on it.</p>
<p>For multiple buttons, it gets slightly more complicated, but is still easier than the HTML. Here’s how you put two:</p>
<div class="codecolorer-container php vibrant" style="overflow: auto; white-space: nowrap;">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="line-numbers">
<div>1</div>
</td>
<td>
<div class="php codecolorer" style="white-space: nowrap;"><span class="br0">[</span>sliderbutton <a href="http://www.php.net/count"><span class="kw3">count</span></a><span class="sy0">=</span><span class="st0">"2"</span> url<span class="sy0">=</span><span class="st0">"/try|/buy"</span> label<span class="sy0">=</span><span class="st0">"Try It|Buy Now"</span> delimiter<span class="sy0">=</span><span class="st0">"or"</span><span class="br0">]</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<p>The shortcode uses the pipe symbol (|) as a delimiter. So the above gets you two buttons. The first goes to /try and is labeled Try It, the second goes to /buy and is labeled Buy Now.</p>
<p>The delimiter specifies that the word “or” will be between the two, correctly formatted and with a space on either side. The word “or” is the default, so I could have left that off, but I included it by way of example. Using delimiter=”and” would put an “and” between the two buttons.</p>
<p>Some limitations: I didn’t put in error checking to make sure your count, URLs, and labels all have the right number. You have to use the same delimiter throughout, so no “this or that and another” constructions. Still, most of the time, you’ll be using only one or two buttons, they’ll use “or”, and an error message would still mean you’d have to edit stuff, so I figured these were acceptable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heatherstone.com/an-easier-way-to-place-buttons-in-the-coffee-break-slider/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
