<?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>Thailand Finance Business News and Lifestyle &#124; SilomJournal.Com &#187; jcarousel</title>
	<atom:link href="http://silomjournal.com/tag/jcarousel/feed/" rel="self" type="application/rss+xml" />
	<link>http://silomjournal.com</link>
	<description>Thailand Finance Business News and Lifestyle</description>
	<lastBuildDate>Sat, 31 Jul 2010 03:45:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to integrate jCarousel into wordpress theme</title>
		<link>http://silomjournal.com/leisure/how-to-integrate-jcarousel-into-wordpress-theme/</link>
		<comments>http://silomjournal.com/leisure/how-to-integrate-jcarousel-into-wordpress-theme/#comments</comments>
		<pubDate>Tue, 27 May 2008 16:59:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Leisure]]></category>
		<category><![CDATA[jcarousel]]></category>

		<guid isPermaLink="false">http://silomjournal.com/?p=130</guid>
		<description><![CDATA[It took me two weeks to finally understand how to embed jCarousel into my wordpress-powered site. Now that it works like a charm, I am going to try to share it with everyone.
jCarousel is a jQuery plugin for controlling a list of items in horizontal or vertical order. The items, which can be static HTML [...]]]></description>
			<content:encoded><![CDATA[<p>It took me two weeks to finally understand how to embed jCarousel into my wordpress-powered site. Now that it works like a charm, I am going to try to share it with everyone.</p>
<p>jCarousel is a jQuery plugin for controlling a list of items in horizontal or vertical order. The items, which can be static HTML content or loaded with (or without) AJAX, can be scrolled back and forth (with or without animation).</p>
<p>jCarousel is also a functional blog tool that makes your site more dynamic and more attractive. It has been a feature in several wordpress premium themes. And it&#8217;s free.</p>
<p>Adding jCarousel into wordpress is quite easy. I wonder why no one writes tutorial about it&#8211;Googling <img src='http://silomjournal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As a non-coder, the following directions are only a simple how to. I do not know if it is practical with every theme.</p>
<p>Instruction:</p>
<ul>
<li>Download jCaruosel from <a href="http://sorgalla.com/jcarousel/">here</a>.</li>
<li>Open the header.php file and add the following codes between &lt;head&gt; and &lt;/head&gt; tags.</li>
</ul>
<p>&lt;!&#8211;  jQuery library &#8211;&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;?php bloginfo(&#8217;stylesheet_directory&#8217;); ?&gt;/jcarousel/lib/jquery-1.2.3.pack.js&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;!&#8211;  jCarousel library  &#8211;&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;?php bloginfo(&#8217;stylesheet_directory&#8217;); ?&gt;/jcarousel/lib/jquery.jcarousel.pack.js&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;!&#8211;  jCarousel core stylesheet  &#8211;&gt;<br />
&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;&lt;?php bloginfo(&#8217;template_url&#8217;); ?&gt;/jcarousel/lib/jquery.jcarousel.css&#8221; /&gt;</p>
<p>&lt;!&#8211;  jCarousel skin stylesheet  &#8211;&gt;<br />
&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;&lt;?php bloginfo(&#8217;template_url&#8217;); ?&gt;/jcarousel/skins/ie7/skin.css&#8221; /&gt;</p>
<ul>
<li>Call the jQcarousel slide show to appear virtually anywhere on your website with the following scripts and basic html markups. (Carousel with auto scrolling and 5 images in the sequence. Other scripts can be obtained by go to the <a href="http://sorgalla.com/projects/jcarousel/examples/static_auto.html">example</a> page and, on IE, at the menu bar, simply click View &gt;&gt; Source.)</li>
</ul>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function mycarousel_initCallback(carousel) {<br />
// Disable autoscrolling if the user clicks the prev or next button.<br />
carousel.buttonNext.bind(&#8217;click&#8217;, function() {<br />
carousel.startAuto(0);<br />
});</p>
<p>carousel.buttonPrev.bind(&#8217;click&#8217;, function() {<br />
carousel.startAuto(0);<br />
});</p>
<p>// Pause autoscrolling if the user moves with the cursor over the clip.<br />
carousel.clip.hover(function() {<br />
carousel.stopAuto();<br />
}, function() {<br />
carousel.startAuto();<br />
});<br />
};</p>
<p>jQuery(document).ready(function() {<br />
jQuery(&#8217;#mycarousel&#8217;).jcarousel({<br />
auto: 3,<br />
visible: 5,<br />
wrap: &#8216;last&#8217;,<br />
initCallback: mycarousel_initCallback<br />
});<br />
});<br />
&lt;/script&gt;</p>
<ul>
<li>Now that you have to pull images to show on the slide with simple HTML markups just like these.</li>
</ul>
<p>&lt;ul id=&#8221;mycarousel&#8221; class=&#8221;jcarousel-skin-ie7&#8243;&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg">http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg">http://static.flickr.com/75/199481072_b4a0d09597_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg">http://static.flickr.com/57/199481087_33ae73a8de_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/77/199481108_4359e6b971_s.jpg">http://static.flickr.com/77/199481108_4359e6b971_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg">http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg">http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/58/199481218_264ce20da0_s.jpg">http://static.flickr.com/58/199481218_264ce20da0_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg">http://static.flickr.com/69/199481255_fdfe885f87_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg">http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;img src=&#8221;<a href="http://static.flickr.com/70/229228324_08223b70fa_s.jpg">http://static.flickr.com/70/229228324_08223b70fa_s.jpg</a>&#8221; width=&#8221;75&#8243; height=&#8221;75&#8243; alt=&#8221;" /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<ul>
<li>But I would like to pull images from my <a href="http://silomjournal.com/leisure/the-blue-gem-at-of-ayudhya/">posts</a> under the Featured category using custom field. So I change the codes to:</li>
</ul>
<p>&lt;?php $the_query = new WP_Query(&#8217;category_name=featured&amp;showposts=1&amp;offset=1&#8242;); while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?&gt;</p>
<p>&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;Permanent Link to &lt;?php the_title(); ?&gt;&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8217;stylesheet_directory&#8217;); ?&gt;/images/uploads/&lt;?php echo get_post_meta($post-&gt;ID, &#8220;featured_home_img&#8221;, $single = true); ?&gt;&#8221; alt=&#8221;&lt;?php the_title(); ?&gt;&#8221; /&gt;&lt;/a&gt;</p>
<p>&lt;?php endwhile; ?&gt;</p>
<ul>
<li>And it will looks like this:</li>
</ul>
<p>&lt;ul id=&#8221;mycarousel&#8221; class=&#8221;jcarousel-skin-ie7&#8243;&gt;</p>
<p>&lt;li&gt;<br />
&lt;?php $the_query = new WP_Query(&#8217;category_name=featured&amp;showposts=1&amp;offset=1&#8242;); while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?&gt;<br />
&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;Permanent Link to &lt;?php the_title(); ?&gt;&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8217;stylesheet_directory&#8217;); ?&gt;/images/uploads/&lt;?php echo get_post_meta($post-&gt;ID, &#8220;featured_home_img&#8221;, $single = true); ?&gt;&#8221; alt=&#8221;&lt;?php the_title(); ?&gt;&#8221; /&gt;&lt;/a&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;/li&gt;<br />
&lt;li&gt;<br />
&lt;?php $the_query = new WP_Query(&#8217;category_name=featured&amp;showposts=1&amp;offset=2&#8242;); while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?&gt;<br />
&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;Permanent Link to &lt;?php the_title(); ?&gt;&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8217;stylesheet_directory&#8217;); ?&gt;/images/uploads/&lt;?php echo get_post_meta($post-&gt;ID, &#8220;featured_home_img&#8221;, $single = true); ?&gt;&#8221; alt=&#8221;&lt;?php the_title(); ?&gt;&#8221; /&gt;&lt;/a&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;/li&gt;<br />
&lt;li&gt;<br />
.<br />
.<br />
.<br />
&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<ul>
<li>You can add as many posts as you wish. Avoided post duplicated by simply changing the number after &amp;offset=1 to 2,3,4&#8230; according to the list.</li>
<li>This will be a long list if you want many images appearing on the slide. So open a new file e.g. carousel.php and call it with this code:</li>
</ul>
<p>&lt;?php include (TEMPLATEPATH . &#8216;/carousel.php&#8217;); ?&gt;</p>
<ul>
<li>It will look like this:</li>
</ul>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
BLAH BLAH BLAH<br />
BLAH BLAH BLAH<br />
BLAH BLAH BLAH<br />
&lt;/script&gt;<br />
&lt;?php include (TEMPLATEPATH . &#8216;/carousel.php&#8217;); ?&gt;</p>
<ul>
<li>Lastly, control your carousel layout with the CSS:</li>
</ul>
<p>#mycarousel {<br />
float: left;<br />
width: 450px;<br />
text-align: center;<br />
}</p>
<p>#mycarousel ul {<br />
list-style: none;<br />
}</p>
<p>#mycarousel li {<br />
float: left;<br />
display: block;<br />
}</p>
<p>#mycarousel li a {<br />
color: #FFF;<br />
}</p>
<p>#mycarousel li a:hover{color:#CCC;}</p>
<ul>
<li>Actually, the above CSS is almost unnecessary. jCarousel has its own CSS in the skins folder, but this will give it a more proper width and format to your page.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://silomjournal.com/leisure/how-to-integrate-jcarousel-into-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
