<?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>LoriB.me&#187; WordPress</title>
	<atom:link href="http://lorib.me/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://lorib.me</link>
	<description>New home of LBnuke</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:54:33 +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>Change Admin Post/Page List Color By Status</title>
		<link>http://lorib.me/code-snippets/change-admin-postpage-list-color-by-status/</link>
		<comments>http://lorib.me/code-snippets/change-admin-postpage-list-color-by-status/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 16:18:45 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=3212</guid>
		<description><![CDATA[Favorite WordPress tip of the week: This snippet will change the background colors of posts, pages, and custom post types in the administration post/page lists based on their status, i.e. draft, private, pending, etc. Note: Draft color changed to a slightly lighter yellow than original. No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>Favorite WordPress tip of the week:</strong></p>
<p>This snippet will change the background colors of posts, pages, and custom post types in the administration post/page lists based on their status, i.e. draft, private, pending, etc.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
add_action('admin_footer','posts_status_color');
function posts_status_color(){
?&gt;
&lt;style&gt;
.status-draft { background: #ffffe0 !important ; }
.status-future { background: #cf9 !important; }
.status-publish { /* no background - keep alternating rows */ }
.status-pending { background: #87c5d6 !important; }
.status-private { background:#fc9; }
&lt;/style&gt;
&lt;?php
}
</pre>
<p>Note: Draft color changed to a slightly lighter yellow than original.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/change-admin-postpage-list-color-by-status/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t get_the_permalink()</title>
		<link>http://lorib.me/code-snippets/dont-get-the-permalink/</link>
		<comments>http://lorib.me/code-snippets/dont-get-the-permalink/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 18:48:30 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=3171</guid>
		<description><![CDATA[get_the_permalink() does not exist. Use get_permalink. Note to self: Debug my own site like I would debug any other site. I have used that function an uncountable amount of times, but got confused anyway because of having get_the_title() on my brain. This tip was brought to you by the half hour of my life that [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p><code>get_the_permalink()</code> does not exist. Use <a href="http://codex.wordpress.org/Function_Reference/get_permalink"><code>get_permalink</code></a>.</p>
<p><strong>Note to self:</strong> Debug my own site like I would debug any other site.</p>
<p>I have used that function an uncountable amount of times, but got confused anyway because of having <code>get_the_title()</code> on my brain.</p>
<p>This tip was brought to you by the half hour of my life that I will never get back.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/dont-get-the-permalink/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Customize the WordPress Login Page</title>
		<link>http://lorib.me/code-snippets/customize-the-wordpress-login-page/</link>
		<comments>http://lorib.me/code-snippets/customize-the-wordpress-login-page/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 13:04:34 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=3073</guid>
		<description><![CDATA[I love WordPress and am personally very happy to see the WordPress logo when I log into a site, but when building sites for some clients (and on my own development site where I build sites for clients to preview), it is nice to use their own logo for the login page. It gives a [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div id="attachment_3078" class="wp-caption aligncenter" style="width: 388px"><img class="size-full wp-image-3078" title="Custom Login Page" src="http://lorib.me/wp-content/uploads/2011/07/beedragon-login-page.png" alt="Custom Login Page" width="378" height="424" /><p class="wp-caption-text">Custom Login Page</p></div>
<p>I love WordPress and am personally very happy to see the WordPress logo when I log into a site, but when building sites for some clients (and on my own development site where I build sites for clients to preview), it is nice to use their own logo for the login page. It gives a more professional look and fits in with the rest of their branding.</p>
<p><strong>This snippet will use a custom logo instead of the WordPress default logo.</strong></p>
<p>1. Upload your logo to the server, either manually or through the WordPress media library. It is best if the logo image is 326×82 px or smaller.</p>
<p>2. In your theme&#8217;s <em>functions.php</em> file, add this code:</p>
<pre class="brush: php; title: ; notranslate">// login page logo
function custom_login_logo() {
    echo '&lt;style type=&quot;text/css&quot;&gt;h1 a { background: url('.get_bloginfo('url').'/PATH_TO_IMAGE/YOUR_IMAGE.png) 50% 50% no-repeat !important; }&lt;/style&gt;';
}
add_action('login_head', 'custom_login_logo');</pre>
<p>Replace <code>PATH_TO_IMAGE/YOUR_IMAGE.png</code> with the path to your logo image, i.e. <code>images/logo.png</code>.</p>
<p><strong>To customize the entire login page (including the logo), you can use a similar function to call a custom stylesheet for the login page:</strong></p>
<pre class="brush: php; title: ; notranslate">// custom login page
function custom_login_page() {
	echo '&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;' . get_bloginfo('stylesheet_directory') . '/customlogin.css&quot; /&gt;';
}

add_action('login_head', 'custom_login_page');</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/customize-the-wordpress-login-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Custom Fields In &amp; Out of The Loop</title>
		<link>http://lorib.me/code-snippets/display-custom-fields-in-out-of-the-loop/</link>
		<comments>http://lorib.me/code-snippets/display-custom-fields-in-out-of-the-loop/#comments</comments>
		<pubDate>Wed, 25 May 2011 14:24:56 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[The Loop]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2995</guid>
		<description><![CDATA[INSIDE THE LOOP: OUTSIDE THE LOOP: No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<h3>INSIDE THE LOOP:</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php

if ( get_post_meta($post-&gt;ID, 'custom-field-name', true) ) :
	echo get_post_meta($post-&gt;ID, 'custom-field-name', true);
	endif;

?&gt;</pre>
<h3>OUTSIDE THE LOOP:</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php

	global $wp_query;
	$postid = $wp_query-&gt;post-&gt;ID;
	echo get_post_meta($postid, 'custom-field-name', true);
	wp_reset_query();

?&gt;
</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/display-custom-fields-in-out-of-the-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Numbered Search Results in WordPress</title>
		<link>http://lorib.me/code-snippets/numbered-search-results-in-wordpress/</link>
		<comments>http://lorib.me/code-snippets/numbered-search-results-in-wordpress/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 01:40:34 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2844</guid>
		<description><![CDATA[I needed to show search results in an ordered list for a project I am working on and was very surprised to discover how involved this is for paginated search results. Showing the results using a regular ordered list starts the list numbering over at 1 on each new page of results, even though the [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I needed to show search results in an ordered list for a project I am working on and was very surprised to discover how involved this is for paginated search results. Showing the results using a regular ordered list starts the list numbering over at 1 on each new page of results, even though the next set of results was being displayed. </p>
<p>After some horribly hacky solution involving grabbing the page number from the URL and hard coding the number of posts per page, I was led in the right direction by NicktheGeek at <a href="http://lorib.me/studiopress" title="Affiliate Link - Your clicks are appreciated!">StudioPress</a> who suggested getting the number of posts per page from the query string and using the paged value to get the numbers dynamically before applying the math to get the list numbers to display correctly.</p>
<p>A bunch of CSS was required to make the list numbers look like they were actually generated by an &lt;ol&gt; tag. Styling will vary depending on your theme, but one thing that may help if things are looking messed up is to display the post/page titles and contents inline.</p>
<p><strong>CSS:</strong></p>
<pre class="brush: css; title: ; notranslate">.search-results #content h2.entry-title,
.search-results #content .post,
.search-results #content .page {
	display: inline;
}</pre>
<p><strong>PHP:</strong><br />
For non-Genesis themes, leave out the genesis_ lines.</p>
<pre class="brush: php; title: ; notranslate">global $paged;
if(empty($paged)) $paged = 1;

$loop_counter = 1;

$results_per_page = get_query_var('posts_per_page');

echo '&lt;ol class=&quot;search-list&quot;&gt;';

genesis_before_post();

if ( have_posts() ) : while ( have_posts() ) : the_post();

	if( $paged == 1 ) {
		$real_count = $loop_counter;
	} else {
		$real_count = $loop_counter + ( $paged * $results_per_page - $results_per_page);
	}

	echo '&lt;li&gt;&lt;span class=&quot;listnum&quot;&gt;' . $real_count . '.&lt;/span&gt;';

	// The Post

	echo '&lt;/li&gt;';

	genesis_after_post();

	$loop_counter++;

	endwhile;
	genesis_after_endwhile();

else :
	genesis_loop_else();
endif;

echo '&lt;/ol&gt;';</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/numbered-search-results-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function: wp_tag_cloud</title>
		<link>http://lorib.me/code-snippets/function-wp_tag_cloud/</link>
		<comments>http://lorib.me/code-snippets/function-wp_tag_cloud/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 19:30:50 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2829</guid>
		<description><![CDATA[Usage: Defaults: Parameters: smallest (integer) (optional) The text size of the tag with the smallest count value (units given by unit parameter). Default: 8 largest (integer) (optional) The text size of the tag with the highest count value (units given by the unit parameter). Default: 22 unit (string) (optional) Unit of measure as pertains to [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>Usage:</strong></p>
<pre class="brush: php; title: ; notranslate">&lt;?php wp_tag_cloud( $args ); ?&gt;</pre>
<p><strong>Defaults:</strong></p>
<pre class="brush: php; title: ; notranslate"> &lt;?php $args = array(
    'smallest'                  =&gt; 8,
    'largest'                   =&gt; 22,
    'unit'                      =&gt; 'pt',
    'number'                    =&gt; 45,
    'format'                    =&gt; 'flat',
    'separator'                 =&gt; \&quot;\n\&quot;,
    'orderby'                   =&gt; 'name',
    'order'                     =&gt; 'ASC',
    'exclude'                   =&gt; null,
    'include'                   =&gt; null,
    'topic_count_text_callback' =&gt; default_topic_count_text,
    'link'                      =&gt; 'view',
    'taxonomy'                  =&gt; 'post_tag',
    'echo'                      =&gt; true ); ?&gt;</pre>
<p><strong>Parameters:</strong></p>
<p><code>smallest</code><br />
    (integer) (optional) The text size of the tag with the smallest count value (units given by unit parameter).</p>
<p>        Default: 8 </p>
<p><code>largest</code><br />
    (integer) (optional) The text size of the tag with the highest count value (units given by the unit parameter).</p>
<p>        Default: 22 </p>
<p><code>unit</code><br />
    (string) (optional) Unit of measure as pertains to the smallest and largest values. This can be any CSS length value, e.g. pt, px, em, %.</p>
<p>        Default: &#8216;pt&#8217; </p>
<p><code>number</code><br />
    (integer) (optional) The number of actual tags to display in the cloud. (Use &#8217;0&#8242; to display all tags.)</p>
<p>        Default: 45 </p>
<p><code>format</code><br />
    (string) (optional) Format of the cloud display.</p>
<ul>
<li>&#8216;flat&#8217; separated by whitespace defined by &#8216;separator&#8217; parameter.</li>
<li>&#8216;list&#8217; UL with a class of &#8216;wp-tag-cloud&#8217;</li>
<li>&#8216;array&#8217; returns the tag cloud as an array for use in PHP </li>
</ul>
<p>        Default: flat </p>
<p><code>separator</code><br />
    (string) (optional) The text/space between tags.</p>
<p>        Default: &#8216;\n&#8217; (whitespace) </p>
<p><code>orderby</code><br />
    (string) (optional) Order of the tags.</p>
<ul>
<li>&#8216;name&#8217;</li>
<li>&#8216;count&#8217;</li>
</ul>
<p>        Default: name </p>
<p><code>order</code><br />
    (string) (optional) Sort order.</p>
<ul>
<li>&#8216;ASC&#8217;</li>
<li>&#8216;DESC&#8217;</li>
<li>&#8216;RAND&#8217; tags are in a random order.</li>
</ul>
<p>        Default: ASC </p>
<p><code>exclude</code><br />
    (string) (null) optional</p>
<p>        Default: None </p>
<p><code>include</code><br />
    (string) (null) optional</p>
<p>        Default: None </p>
<p><code>topic_count_text_callback</code><br />
    (string) (optional) The function, which, given the count of the posts with that tag, returns a text for the tooltip of the tag link.</p>
<p>        Default: default_topic_count_text </p>
<p><code>link</code><br />
    (string) (optional) Set link to allow edit of a particular tag.</p>
<ul>
<li>&#8216;view&#8217;</li>
<li>&#8216;edit&#8217;</li>
</ul>
<p>        Default: view </p>
<p><code>taxonomy</code><br />
    (string or array) (optional) Taxonomy or array of taxonomies to use in generating the cloud.</p>
<ul>
<li>&#8216;post_tag&#8217;</li>
<li> &#8216;category&#8217;</li>
<li>&#8216;link_category&#8217;</li>
<li>&#8216;any other registered taxonomy&#8217;</li>
<li>or array of taxonomies Note: this parameter was introduced with Version 3.1 </li>
</ul>
<p>        Default: post_tag </p>
<p><code>echo</code><br />
    (boolean) (optional) Display the result or return it in a variable. The default is true (display the tag cloud).</p>
<ul>
<li>1 (true)</li>
<li>0 (false) </li>
</ul>
<p>        Default: true </p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/function-wp_tag_cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Genesis: Remove/Change post info/post meta</title>
		<link>http://lorib.me/code-snippets/genesis-removechange-post-infometa/</link>
		<comments>http://lorib.me/code-snippets/genesis-removechange-post-infometa/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 20:29:15 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[Genesis]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2784</guid>
		<description><![CDATA[Please note that you do not need to remove a function before editing it. Hat tip to jim No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">// Remove post meta
remove_action('genesis_after_post_content', 'genesis_post_meta');

// Customize the post meta function
add_filter('genesis_post_meta', 'post_meta_filter');
function post_meta_filter($post_meta) {
if (!is_page()) {
    $post_meta = '<span class="categories">Filed Under: </span>  <span class="tags">Tagged With: <a href="http://lorib.me/tag/genesis/" rel="tag">Genesis</a>, <a href="http://lorib.me/tag/wordpress/" rel="tag">WordPress</a></span> ';
    return $post_meta;
}}

// Remove the post info function
remove_action('genesis_before_post_content', 'genesis_post_info');

// Customize the post info function
add_filter('genesis_post_info', 'post_info_filter');
function post_info_filter($post_info) {
if (!is_page()) {
    // Spaces are added to [ shortcodes ] so that they will display in this post.
    $post_info = '[ post_date ] by [ post_author_posts_link ] at [ post_time ] [ post_comments ] [ post_edit ]';
    return $post_info;
}}</pre>
<p><strong>Please note that you do not need to remove a function before editing it.</strong> Hat tip to <a href="/code-snippets/genesis-removechange-post-infometa/comment-page-1/#comment-54444">jim</a> <img src='http://lorib.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/genesis-removechange-post-infometa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Genesis: Custom loop arguments</title>
		<link>http://lorib.me/code-snippets/genesis-custom-loop-arguments/</link>
		<comments>http://lorib.me/code-snippets/genesis-custom-loop-arguments/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 20:23:02 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[Genesis]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2775</guid>
		<description><![CDATA[No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'custom_do_cat_loop');

function custom_do_cat_loop() {
    global $query_args;  // any wp_query() args
    $args= array('orderby' =&gt; 'title', 'order' =&gt; 'ASC');
    genesis_custom_loop(wp_parse_args($query_args, $args));
}</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/genesis-custom-loop-arguments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Genesis: Custom Page Template</title>
		<link>http://lorib.me/code-snippets/genesis-custom-page-template/</link>
		<comments>http://lorib.me/code-snippets/genesis-custom-page-template/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 20:17:58 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[Genesis]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2771</guid>
		<description><![CDATA[No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">&lt;?php // Template Name: Template Name Here

remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'custom_loop');

function custom_loop() {
    global $paged;
    $args = array('post_type' =&gt; 'PostType'); // any wp_query args can go here
    genesis_custom_loop( $args );

}

genesis();</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/genesis-custom-page-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Genesis: Default Post Thumbnail</title>
		<link>http://lorib.me/code-snippets/genesis-default-post-thumbnail/</link>
		<comments>http://lorib.me/code-snippets/genesis-default-post-thumbnail/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 17:17:00 +0000</pubDate>
		<dc:creator>Lori</dc:creator>
				<category><![CDATA[Genesis]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lorib.me/?post_type=lbn_snippet&#038;p=2765</guid>
		<description><![CDATA[No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">// Default post thumbnail
add_filter('genesis_get_image', 'default_image_fallback', 10, 2);
	function default_image_fallback($output, $args) {
			global $post;
			if( $output || $args['size'] == 'full' )
					return $output;

			$thumbnail = CHILD_URL.'/images/thumb.jpg';

			switch($args['format']) {

					case 'html' :
							return '&lt;img src=&quot;'.$thumbnail.'&quot; class=&quot;alignleft post-image&quot; alt=&quot;'. get_the_title($post-&gt;ID) .'&quot; /&gt;';
							break;
					case 'url' :
							return $thumbnail;
							break;
				 default :
						 return $output;
							break;
			}
	}</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://lorib.me/code-snippets/genesis-default-post-thumbnail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  lorib.me/tag/wordpress/feed/ ) in 0.97653 seconds, on Feb 9th, 2012 at 12:48 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 1:48 pm UTC -->
