<?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>Graph Paper Press &#187; tutorial</title>
	<atom:link href="http://graphpaperpress.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://graphpaperpress.com</link>
	<description>Graph Paper Press specializes in photo, video and multimedia themes for Wordpress.</description>
	<lastBuildDate>Wed, 08 Feb 2012 21:56:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to create a child theme for the Base theme for WordPress</title>
		<link>http://graphpaperpress.com/2011/02/25/how-to-create-a-child-theme-for-the-base-theme-for-wordpress/</link>
		<comments>http://graphpaperpress.com/2011/02/25/how-to-create-a-child-theme-for-the-base-theme-for-wordpress/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 19:11:15 +0000</pubDate>
		<dc:creator>Thad Allender</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://graphpaperpress.com/?p=2299</guid>
		<description><![CDATA[In this tutorial, I'll show you how to customize our <a title="Base theme framework for WordPress" href="http://graphpaperpress.com/themes/base/">Base theme framework</a> for <a title="WordPress" href="http://wordpress.org">WordPress</a> so you can protect your code changes from any future theme upgrades that we release.  Before we started, please <a title="Base Custom child theme for the Base theme framework" href="http://cdn.graphpaperpress.com.s3.amazonaws.com/files/base-custom.zip">download this Base Custom Child Theme</a> (a starter child theme for Base, used in the examples).  Lets review some basic concepts regarding WordPress theming:]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, I&#8217;ll show you how to customize our <a title="Base theme framework for WordPress" href="http://graphpaperpress.com/themes/base/">Base theme framework</a> for <a title="WordPress" href="http://wordpress.org">WordPress</a> so you can protect your code changes from any future theme upgrades that we release.  Before we started, please <a title="Base Custom child theme for the Base theme framework" href="http://cdn.graphpaperpress.com.s3.amazonaws.com/files/base-custom.zip">download this Base Custom Child Theme</a> (a starter child theme for Base, used in the examples below).  Lets review some basic concepts regarding WordPress theming:</p>
<h3>What is a child theme?</h3>
<p>From the <a href="http://codex.wordpress.org/">WordPress Codex</a>:</p>
<blockquote><p>A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.</p></blockquote>
<p>A basic child theme consists of only a style.css file.  If you plan on using the available Action Hooks and Filters in Base (more on this later), you will also need to create a functions.php file.  I always add a screenshot.png file, too, which shows up on the Appearance -&gt; Themes page.  Instead of making changes directly to your Base theme, we recommend creating a child theme, so your code modifications are protected from theme updates.</p>
<h3>BEGINNER: Creating a style.css stylesheet for a child theme</h3>
<p>Every child theme needs a style.css file.  It tells WordPress specific required information about the child and parent theme.  Here is an example:</p>
<pre class="brush: css; title: ; notranslate">
/*
Theme Name: Base Custom
Theme URI: http://graphpaperpress.com
Description: A child theme for Base Theme Framework.
Author: Graph Paper Press
Author URI: http://graphpaperpress.com
Template: base
Version: 1.0.0
License:  GPL
*/

@import url(&quot;../base/style.css&quot;);

/* ADD YOUR CUSTOM CSS BELOW THIS LINE */
body { background-color: #000; color: #fff }
</pre>
<p>Everything located between the starting <code class="backtick">/*</code> and ending <code class="backtick">*/</code> comments tell WordPress important information about the child theme.  These are mandatory:</p>
<ul>
<li><strong>Theme Name: Base Custom</strong> &#8211; the name of our child theme</li>
<li><strong>Template: base</strong> &#8211; the folder name of our patent theme (in this case, base).  Case matters!</li>
</ul>
<p>This line:</p>
<pre class="brush: css; title: ; notranslate">@import url(&quot;../base/style.css&quot;);</pre>
<p>Imports the style.css file of our parent theme (Base) into our child theme stylesheet. The <code class="backtick">&#46;&#46;/</code> tells WordPress to &#8220;move up one directory out of the base-custom folder and then move down into the base folder.  It&#8217;s important to include this <code class="backtick">@import</code> rule before your custom css.  All css rules that show up after this rule will override the parent theme styles.  Now, you can override any CSS class in the parent theme.  Using the Custom CSS panel in Base also overrides default Base CSS styles.  To find and located the specific CSS class you want to override, use <a title="Firebug" href="http://getfirebug.com/">Firebug</a>.</p>
<h3>BEGINNER: Creating a functions.php file for your Base Child Theme</h3>
<p>The functions.php file is where you can define your own PHP functions for your child theme.  To start, we will use this file to  declare the name of the child theme (populates the Theme Options page with your Child Theme name).  A basic functions.php file looks like this:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?php
// Lets declare the name of our child theme
$themename = &quot;Base Custom&quot;;
</pre>
<p>Comments in PHP code start with this <code class="backtick">//</code> or this: <code class="backtick">/*</code>.  They are used to make code easier to understand.  Now that we have a functions.php file and we&#8217;ve declared the name of our child theme, lets write a basic PHP function in our functions.php file that creates a simple message:</p>
<pre class="brush: php; title: ; notranslate">

function gpp_base_custom_message() {

    echo '&lt;h2&gt;This is a short message that will appear below our header&lt;/h2&gt;';

}
</pre>
<p>Now that we&#8217;ve created our function, we need to &#8220;hook&#8221; it into one of the available <a title="Base Theme Action Hooks" href="http://demo.graphpaperpress.com/wp-content/themes/base/documentation.html">Base Action Hooks</a>.</p>
<h3>INTERMEDIATE: Using Action Hooks to Extend Base Functions</h3>
<p>Action Hooks are essentially empty placeholders that can be injected with stuff.  &#8221;Stuff&#8221; is added using a PHP function.  Once you understand how to write a simple PHP function and you know the exact Base Action Hook location that you want to hook into, you can literally override anything you want in Base.  Here is the <a title="Base theme framework documentation for WordPress" href="http://demo.graphpaperpress.com/wp-content/themes/base/documentation.html">Base Theme Documentation</a> that lists all Action Hooks.</p>
<p>Lets add our welcome message to the <code class="backtick">gpp_base_below_header()</code> Action Hook.  In the functions.php, add this:</p>
<pre class="brush: php; title: ; notranslate">

add_action('gpp_base_below_header', 'gpp_base_custom_message');
</pre>
<p>Above, we are adding the function we wrote above <code class="backtick">gpp_base_custom_message</code> to the <code class="backtick">gpp_base_below_header</code> action hook.  Important Note: Some Base action hooks are already defined in Base, so it&#8217;s important to use the <code class="backtick">remove_action</code> function if you want to, say, change the main index loop in Base:</p>
<pre class="brush: php; title: ; notranslate">

add_action('wp_head','remove_gpp_base_actions');

function remove_gpp_base_actions() {

    remove_action('gpp_base_index_loop', 'gpp_base_index_loop_hook');

}
</pre>
<p>You can override as many functions in Base as you want, as long as those functions are listed on the <a title="Base theme framework action hook reference documentation" href="http://demo.graphpaperpress.com/wp-content/themes/base/documentation.html">Base Action Hooks Documentation</a>.  To see where these Action Hooks are called in Base, view the <a title="Base theme framework guide to action hook structure" href="http://demo.graphpaperpress.com/wp-content/themes/base/base-structure.html">Base Structure Guide</a>.</p>
<h3>INTERMEDIATE: Overriding Parent Template Files</h3>
<p>If using Action Hooks is confusing, simply rely on the WordPress template hierarchy and template inheritance to override specific template files.  From the <a title="WordPress codex on Child Themes" href="http://codex.wordpress.org/Child_Themes">WordPress Codex</a>:</p>
<blockquote><p>Templates in a child theme behave just like style.css, in that they override their namesakes from the parent. A child theme can override any parental template by simply using a file with the same name. (NOTE. index.php can be overriden only in WordPress 3.0 and newer.)  Again, this WordPress feature lets you modify the templates of a parent theme without actually editing them, so that your modifications are preserved when the parent theme is updated.</p></blockquote>
<p>If a child theme contains, for example, an index.php file, it will take precedence over the parent theme&#8217;s index.php template file.  This only pertains to files that fall within the <a title="WordPress template heirarchy" href="http://codex.wordpress.org/Template_Hierarchy">WordPress template hierarchy</a>.  You can&#8217;t override all parent theme files simply by recreating them in a child theme.</p>
<h3>And that&#8217;s all folks</h3>
<p>Well, actually that&#8217;s just a jumping off point.  Feel free to <a href="http://cdn.graphpaperpress.com.s3.amazonaws.com/files/base-custom.zip">use the example Base Custom Child Theme</a> to create you own child theme for our <a title="Base theme framework for WordPress" href="http://graphpaperpress.com/themes/base/">Base Theme Framework for WordPress</a>.  In the next tutorial, we&#8217;ll show you how to essentially build child themes of child themes, so your modifications to child themes are never overwritten.</p>
]]></content:encoded>
			<wfw:commentRss>http://graphpaperpress.com/2011/02/25/how-to-create-a-child-theme-for-the-base-theme-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to add featured sliding content to WordPress</title>
		<link>http://graphpaperpress.com/2009/03/15/jquery-sliding-content-wordpress/</link>
		<comments>http://graphpaperpress.com/2009/03/15/jquery-sliding-content-wordpress/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 05:28:02 +0000</pubDate>
		<dc:creator>Thad Allender</dc:creator>
				<category><![CDATA[Member only]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://graphpaperpress.com/?p=353</guid>
		<description><![CDATA[In this tutorial, I'll show you how to add a sliding content region to your Wordpress site.  You can download the source code for the tutorial, which contains everything you need to put this little thingy on your site in 5 minutes max.]]></description>
			<content:encoded><![CDATA[<p><a href="http://graphpaperpress.com/downloads-free/tutorials/sliders/"><img src="http://d20g70ffbsoayt.cloudfront.net/wp-content/uploads/2009/03/slider-screenshot-300x161.jpg" alt="sliding content for wordpress screenshot" title="slider-screenshot" width="300" height="161" class="size-medium wp-image-354 alignleft" /></a>  In this tutorial, I&#8217;ll show you how to add a sliding content region to your WordPress site.  You can download the source code for the tutorial, which contains everything you need to put this little thingy on your site in 5 minutes max.</p>
<p>There are a few basic principle that you must know before jumping into this tutorial.   First, javascripts are like car parts:  You can&#8217;t mix Ford parts and expect them to work on a Honda.  The same goes with javascript libraries.  Conflicting javascript libraries can cause some javascript-powered features to &#8220;choke&#8221; or freeze.  There are ways to use multiple libraries together, but that is beyond the scope of this tutorial.  Second, you must load JQUERY before you load JQUERY plugins, like the ones we use on our sites.  Make sure that JQUERY shows before other javascripts in the head of your site.</p>
<p><a href="http://graphpaperpress.com/downloads-free/tutorials/sliders/" class="button">Demo</a></p>
<p><a href="http://d20g70ffbsoayt.cloudfront.net/wp-content/uploads/2009/03/slider.zip" class="button">Download</a></p>
<p><strong>First</strong><br />
Unzip the download files posted above.  Upload slider.css, slider.php, timthumb.php, the /js/ and /cache/ folders into your active theme folder.  Copy the contents of the /images/ folder into your themes /images/ folder.  Do not overwrite your existing /images/ folder.  TimThumb.php requires the GD library, which is available on any host sever with PHP 4.3+ installed.  Manually change the /cache/ folder permissions to 777.</p>
<p>Open up header.php in the theme editor.  Add these three lines of code somewhere between the <code class="backtick">&lt;code&gt;&#95;&#95;abENT&#95;&#95;lt;head&#95;&#95;abENT&#95;&#95;gt;&lt;/code&gt;</code> and <code class="backtick">&lt;code&gt;&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;head&#95;&#95;abENT&#95;&#95;gt;&lt;/code&gt;</code></p>
<div class="backtick"><pre><code>&lt;code&gt;&#95;&#95;abENT&#95;&#95;lt;link rel=&#95;&#95;abENT&#95;&#95;quot;stylesheet&#95;&#95;abENT&#95;&#95;quot; href=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;lt;?php bloginfo(&#95;&#95;abENT&#95;&#95;apos;template_directory&#95;&#95;abENT&#95;&#95;apos;); ?&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;#8260;slider&#95;&#95;abENT&#95;&#95;#46;css&#95;&#95;abENT&#95;&#95;quot; type=&#95;&#95;abENT&#95;&#95;quot;text&#95;&#95;abENT&#95;&#95;#8260;css&#95;&#95;abENT&#95;&#95;quot; media=&#95;&#95;abENT&#95;&#95;quot;screen&#95;&#95;abENT&#95;&#95;quot; charset=&#95;&#95;abENT&#95;&#95;quot;utf-8&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
&#95;&#95;abENT&#95;&#95;lt;script src=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;lt;?php bloginfo(&#95;&#95;abENT&#95;&#95;apos;template_directory&#95;&#95;abENT&#95;&#95;apos;); ?&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;#8260;js&#95;&#95;abENT&#95;&#95;#8260;jquery-1&#95;&#95;abENT&#95;&#95;#46;3&#95;&#95;abENT&#95;&#95;#46;2&#95;&#95;abENT&#95;&#95;#46;min&#95;&#95;abENT&#95;&#95;#46;js&#95;&#95;abENT&#95;&#95;quot; type=&#95;&#95;abENT&#95;&#95;quot;text&#95;&#95;abENT&#95;&#95;#8260;javascript&#95;&#95;abENT&#95;&#95;quot; charset=&#95;&#95;abENT&#95;&#95;quot;utf-8&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;script&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
&#95;&#95;abENT&#95;&#95;lt;script src=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;lt;?php bloginfo(&#95;&#95;abENT&#95;&#95;apos;template_directory&#95;&#95;abENT&#95;&#95;apos;); ?&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;#8260;js&#95;&#95;abENT&#95;&#95;#8260;slider&#95;&#95;abENT&#95;&#95;#46;js&#95;&#95;abENT&#95;&#95;quot; type=&#95;&#95;abENT&#95;&#95;quot;text&#95;&#95;abENT&#95;&#95;#8260;javascript&#95;&#95;abENT&#95;&#95;quot; charset=&#95;&#95;abENT&#95;&#95;quot;utf-8&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;script&#95;&#95;abENT&#95;&#95;gt;&lt;/code&gt;</code></pre></div>
<p>If you already have JQUERY running on site, do not add it again.  If you are unsure, view your source code and look for a line containing &#8220;jquery.&#8221;</p>
<p><strong>Second</strong><br />
Now that we have loaded the css and javascripts required for running the slider, we can now include the slider.php WordPress template file in your theme files.  Open up index.php or home.php and locate spot where you want to include the slider.  If you are using our Modularity theme framework, you might insert the slider right above this line of code:</p>
<div class="backtick"><pre><code>&lt;code&gt;&#95;&#95;abENT&#95;&#95;lt;?php&lt;br /&gt;
$featured = get_option(&#95;&#95;abENT&#95;&#95;apos;T_featured&#95;&#95;abENT&#95;&#95;apos;);&lt;br /&gt;
if($featured == &#95;&#95;abENT&#95;&#95;quot;On&#95;&#95;abENT&#95;&#95;quot;) { include (THEMELIB &#95;&#95;abENT&#95;&#95;#46; &#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#8260;apps&#95;&#95;abENT&#95;&#95;#8260;featured&#95;&#95;abENT&#95;&#95;#46;php&#95;&#95;abENT&#95;&#95;apos;); }&lt;br /&gt;
?&#95;&#95;abENT&#95;&#95;gt;&lt;/code&gt;</code></pre></div>
<p>Paste this right above it:</p>
<div class="backtick"><pre><code>&lt;code&gt;&#95;&#95;abENT&#95;&#95;lt;?php include (&#95;&#95;abENT&#95;&#95;apos;slider&#95;&#95;abENT&#95;&#95;#46;php&#95;&#95;abENT&#95;&#95;apos;) ?&#95;&#95;abENT&#95;&#95;gt;&lt;/code&gt;</code></pre></div>
<p>As you might guess, this tells WordPress to include the slider.php.</p>
<p><strong>Third</strong><br />
Finally, we are going to create a custom write panel to your WordPress post, so that you can choose a thumbnail for each post.  Open up your functions.php file and add this code right <strong>above</strong> the very last ?>.</p>
<div class="backtick"><pre><code>&lt;code&gt;&#95;&#95;abENT&#95;&#95;#8260;&#95;&#95;abENT&#95;&#95;#8260; Custom Write Panel&lt;br /&gt;
&lt;br /&gt;
$meta_boxes =&lt;br /&gt;
	array(&lt;br /&gt;
		&#95;&#95;abENT&#95;&#95;quot;image&#95;&#95;abENT&#95;&#95;quot; =&#95;&#95;abENT&#95;&#95;gt; array(&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;quot;name&#95;&#95;abENT&#95;&#95;quot; =&#95;&#95;abENT&#95;&#95;gt; &#95;&#95;abENT&#95;&#95;quot;image&#95;&#95;abENT&#95;&#95;quot;,&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;quot;type&#95;&#95;abENT&#95;&#95;quot; =&#95;&#95;abENT&#95;&#95;gt; &#95;&#95;abENT&#95;&#95;quot;text&#95;&#95;abENT&#95;&#95;quot;,&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;quot;std&#95;&#95;abENT&#95;&#95;quot; =&#95;&#95;abENT&#95;&#95;gt; &#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;quot;,&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;quot;title&#95;&#95;abENT&#95;&#95;quot; =&#95;&#95;abENT&#95;&#95;gt; &#95;&#95;abENT&#95;&#95;quot;Image&#95;&#95;abENT&#95;&#95;quot;,&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;quot;description&#95;&#95;abENT&#95;&#95;quot; =&#95;&#95;abENT&#95;&#95;gt; &#95;&#95;abENT&#95;&#95;quot;Using the &#95;&#95;abENT&#95;&#95;#92;&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;lt;em&#95;&#95;abENT&#95;&#95;gt;Add an Image&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;em&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;#92;&#95;&#95;abENT&#95;&#95;quot; button, upload an image and paste the URL here&#95;&#95;abENT&#95;&#95;#46; Images will be resized&#95;&#95;abENT&#95;&#95;#46; This is the post main image and will automatically be sized&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;quot;)&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
function meta_boxes() {&lt;br /&gt;
	global $post, $meta_boxes;&lt;br /&gt;
	&lt;br /&gt;
	echo&#95;&#95;abENT&#95;&#95;apos;&lt;br /&gt;
		&#95;&#95;abENT&#95;&#95;lt;table class=&#95;&#95;abENT&#95;&#95;quot;widefat&#95;&#95;abENT&#95;&#95;quot; cellspacing=&#95;&#95;abENT&#95;&#95;quot;0&#95;&#95;abENT&#95;&#95;quot; id=&#95;&#95;abENT&#95;&#95;quot;inactive-plugins-table&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
		&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;lt;tbody class=&#95;&#95;abENT&#95;&#95;quot;plugins&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
	&lt;br /&gt;
			foreach($meta_boxes as $meta_box) {&lt;br /&gt;
				$meta_box_value = get_post_meta($post-&#95;&#95;abENT&#95;&#95;gt;ID, $pre&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, true);&lt;br /&gt;
				&lt;br /&gt;
				if($meta_box_value == &#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;quot;)&lt;br /&gt;
					$meta_box_value = $meta_box[&#95;&#95;abENT&#95;&#95;apos;std&#95;&#95;abENT&#95;&#95;apos;];&lt;br /&gt;
				&lt;br /&gt;
				echo&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;lt;tr&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
						&#95;&#95;abENT&#95;&#95;lt;td width=&#95;&#95;abENT&#95;&#95;quot;70&#95;&#95;abENT&#95;&#95;quot; align=&#95;&#95;abENT&#95;&#95;quot;center&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;		&lt;br /&gt;
							echo&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;lt;input type=&#95;&#95;abENT&#95;&#95;quot;hidden&#95;&#95;abENT&#95;&#95;quot; name=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;$meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_noncename&#95;&#95;abENT&#95;&#95;quot; id=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;$meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_noncename&#95;&#95;abENT&#95;&#95;quot; value=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;wp_create_nonce( plugin_basename(__FILE__) )&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;quot; &#95;&#95;abENT&#95;&#95;#8260;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
							echo&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;lt;h2&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;$meta_box[&#95;&#95;abENT&#95;&#95;apos;title&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;h2&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
				echo&#95;&#95;abENT&#95;&#95;apos;	&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;td&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
						&#95;&#95;abENT&#95;&#95;lt;td&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
							echo&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;lt;input type=&#95;&#95;abENT&#95;&#95;quot;text&#95;&#95;abENT&#95;&#95;quot; name=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;$meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;quot; value=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;get_post_meta($post-&#95;&#95;abENT&#95;&#95;gt;ID, $meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, true)&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;quot; size=&#95;&#95;abENT&#95;&#95;quot;70%&#95;&#95;abENT&#95;&#95;quot; &#95;&#95;abENT&#95;&#95;#8260;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;lt;br &#95;&#95;abENT&#95;&#95;#8260;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
							echo&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;lt;p&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;lt;label for=&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;$meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;&#95;&#95;abENT&#95;&#95;#46;$meta_box[&#95;&#95;abENT&#95;&#95;apos;description&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos; &#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;label&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;p&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
				echo&#95;&#95;abENT&#95;&#95;apos;	&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;td&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
					&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;tr&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;&lt;br /&gt;
			}&lt;br /&gt;
	&lt;br /&gt;
	echo&#95;&#95;abENT&#95;&#95;apos;&lt;br /&gt;
			&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;tbody&#95;&#95;abENT&#95;&#95;gt;&lt;br /&gt;
		&#95;&#95;abENT&#95;&#95;lt;&#95;&#95;abENT&#95;&#95;#8260;table&#95;&#95;abENT&#95;&#95;gt;&#95;&#95;abENT&#95;&#95;apos;;		&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function create_meta_box() {&lt;br /&gt;
	global $theme_name;&lt;br /&gt;
	if ( function_exists(&#95;&#95;abENT&#95;&#95;apos;add_meta_box&#95;&#95;abENT&#95;&#95;apos;) ) {&lt;br /&gt;
		add_meta_box( &#95;&#95;abENT&#95;&#95;apos;new-meta-boxes&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;Photo for post&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;meta_boxes&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;post&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;normal&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;high&#95;&#95;abENT&#95;&#95;apos; );&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function save_postdata( $post_id ) {&lt;br /&gt;
	global $post, $meta_boxes;&lt;br /&gt;
	&lt;br /&gt;
	foreach($meta_boxes as $meta_box) {&lt;br /&gt;
		&#95;&#95;abENT&#95;&#95;#8260;&#95;&#95;abENT&#95;&#95;#8260; Verify&lt;br /&gt;
		if ( !wp_verify_nonce( $_POST[$meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_noncename&#95;&#95;abENT&#95;&#95;apos;], plugin_basename(__FILE__) )) {&lt;br /&gt;
			return $post_id;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		if ( &#95;&#95;abENT&#95;&#95;apos;page&#95;&#95;abENT&#95;&#95;apos; == $_POST[&#95;&#95;abENT&#95;&#95;apos;post_type&#95;&#95;abENT&#95;&#95;apos;] ) {&lt;br /&gt;
			if ( !current_user_can( &#95;&#95;abENT&#95;&#95;apos;edit_page&#95;&#95;abENT&#95;&#95;apos;, $post_id ))&lt;br /&gt;
				return $post_id;&lt;br /&gt;
		} else {&lt;br /&gt;
			if ( !current_user_can( &#95;&#95;abENT&#95;&#95;apos;edit_post&#95;&#95;abENT&#95;&#95;apos;, $post_id ))&lt;br /&gt;
				return $post_id;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
		$data = $_POST[$meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;];&lt;br /&gt;
		&lt;br /&gt;
		if(get_post_meta($post_id, $meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;) == &#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;quot;)&lt;br /&gt;
			add_post_meta($post_id, $meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, $data, true);&lt;br /&gt;
		elseif($data != get_post_meta($post_id, $pre&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, true))&lt;br /&gt;
			update_post_meta($post_id, $meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, $data);&lt;br /&gt;
		elseif($data == &#95;&#95;abENT&#95;&#95;quot;&#95;&#95;abENT&#95;&#95;quot;)&lt;br /&gt;
			delete_post_meta($post_id, $meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, get_post_meta($post_id, $meta_box[&#95;&#95;abENT&#95;&#95;apos;name&#95;&#95;abENT&#95;&#95;apos;]&#95;&#95;abENT&#95;&#95;#46;&#95;&#95;abENT&#95;&#95;apos;_value&#95;&#95;abENT&#95;&#95;apos;, true));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
add_action(&#95;&#95;abENT&#95;&#95;apos;admin_menu&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;create_meta_box&#95;&#95;abENT&#95;&#95;apos;);&lt;br /&gt;
add_action(&#95;&#95;abENT&#95;&#95;apos;save_post&#95;&#95;abENT&#95;&#95;apos;, &#95;&#95;abENT&#95;&#95;apos;save_postdata&#95;&#95;abENT&#95;&#95;apos;);&lt;/code&gt;</code></pre></div>
<p><strong>You are done.</strong><br />
If you have made it this far, it&#8217;s now time to see your slider in action.  Go write a new post in WordPress, paste the URL to your image in to the new image panel, and view your site.</p>
<p>Cheers.</p>
<p>Thanks to <a href="http://css-tricks.com/moving-boxes/">CSS Tricks</a> for the jquery trick, <a href="http://code.google.com/p/timthumb/">TimThumb</a> for thumbnail generation and <a href="http://wordpress.org">WordPress</a> for the great publishing system.</p>
]]></content:encoded>
			<wfw:commentRss>http://graphpaperpress.com/2009/03/15/jquery-sliding-content-wordpress/feed/</wfw:commentRss>
		<slash:comments>100</slash:comments>
		</item>
		<item>
		<title>Tip: How to change the default WordPress excerpt</title>
		<link>http://graphpaperpress.com/2009/02/18/tip-how-to-change-the-default-wordpress-excerpt/</link>
		<comments>http://graphpaperpress.com/2009/02/18/tip-how-to-change-the-default-wordpress-excerpt/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 12:11:02 +0000</pubDate>
		<dc:creator>Thad Allender</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://graphpaperpress.com/?p=303</guid>
		<description><![CDATA[Ever get tired of those nasty <strong>[...]</strong> ellipses that appear beneath your blog excerpts?  I do.  In this tutorial, I am going to show you how to change Wordpress' default excerpt display without changing core Wordpress files.

Open up functions.php and add this code to the very bottom of the file:]]></description>
			<content:encoded><![CDATA[<p>Ever get tired of those nasty <strong>[...]</strong> ellipses that appear beneath your blog excerpts?  I do.  In this tutorial, I am going to show you how to change WordPress&#8217; default excerpt display without changing core WordPress files.</p>
<p>Open up functions.php and add this code to the very bottom of the file:</p>
<div class="backtick"><pre><code>&lt;?php function gpp_excerpt($text) { return str_replace(&#039;[&#46;&#46;&#46;]&#039;, &#039;&lt;br /&gt;&lt;a href=&quot;&#039;&#46;get_permalink()&#46;&#039;&quot;&gt;Read More &amp;rarr;&lt;/a&gt;&#039;, $text); } add_filter(&#039;the_excerpt&#039;, &#039;gpp_excerpt&#039;); ?&gt;</code></pre></div>
<p>The above code &#8220;filters&#8221; WordPress&#8217; default <strong>the_excerpt</strong> function and replaces it with our own <strong>gpp_excerpt</strong> function.  We have just written a very simple plugin for WordPress.</p>
<p>If, however, you are writing your own excerpts and want to add a Read More permalink, replace:</p>
<div class="backtick"><pre><code>&lt;?php the_excerpt(); ?&gt;</code></pre></div>
<p>with this:</p>
<div class="backtick"><pre><code>&lt;?php the_excerpt(); ?&gt;&lt;span class=&quot;read_more&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;[ Read More &amp;rarr; ]&lt;/a&gt;&lt;/span&gt;</code></pre></div>
<p>If you found this tutorial useful, consider subscribing to Graph Paper Press.  You will get access to our <a href="http://graphpaperpress.com/support/">support forum</a>, where additional tutorials similar to this one are available to our subscribers.</p>
]]></content:encoded>
			<wfw:commentRss>http://graphpaperpress.com/2009/02/18/tip-how-to-change-the-default-wordpress-excerpt/feed/</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 8/15 queries in 0.157 seconds using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d20g70ffbsoayt.cloudfront.net

Served from: graphpaperpress.com @ 2012-02-08 15:36:07 -->
