<?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>SDAC Inc &#124; Chicagoland Web Development &#187; WordPress function</title> <atom:link href="http://www.sandboxdev.com/tag/wordpress-function/feed/" rel="self" type="application/rss+xml" /><link>http://www.sandboxdev.com</link> <description>Just another Sandbox Development and Consulting Inc. Sites site</description> <lastBuildDate>Wed, 25 Jan 2012 07:57: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>HOWTO: Show Page Template Name</title><link>http://www.sandboxdev.com/2011/11/28/howto-show-page-template-name/</link> <comments>http://www.sandboxdev.com/2011/11/28/howto-show-page-template-name/#comments</comments> <pubDate>Mon, 28 Nov 2011 20:49:54 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[SDAC]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Themes]]></category> <category><![CDATA[WordPress Troubleshooting]]></category> <category><![CDATA[get_page_template]]></category> <category><![CDATA[WordPress function]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/?p=7350</guid> <description><![CDATA[A cool function to simply display the path of the WordPress template used on a particular page: How/when to use this? If you are trying to debug a site and want to quickly see what page template is used &#8211; you can put that PHP code into footer.php and it will then echo out the [...]]]></description> <content:encoded><![CDATA[<p>A cool function to simply display the path of the WordPress template used on a particular page:</p><pre class="brush: php; title: Custom Code; notranslate">
&lt;?php echo get_page_template() ?&gt;
</pre><p><strong>How/when to use this?</strong><br
/> If you are trying to debug a site and want to quickly see what page template is used &#8211; you can put that PHP code into footer.php and it will then echo out the path so you can quickly and easily see what template is being used.</p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2011/11/28/howto-show-page-template-name/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Using meta_query With WordPress 3.1+</title><link>http://www.sandboxdev.com/2011/04/14/using-meta_query-with-wordpress-3-1/</link> <comments>http://www.sandboxdev.com/2011/04/14/using-meta_query-with-wordpress-3-1/#comments</comments> <pubDate>Thu, 14 Apr 2011 18:29:58 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[SDAC Blog]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[WordPress function]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/?p=1334</guid> <description><![CDATA[With WordPress 3.1 &#8211; we now have the ability to use &#8220;meta_query&#8221; to show posts associated with a certain custom field. I recently used this in order to create an events listing widget for a client. I needed to query posts in the &#8220;Events&#8221; category and that had a time stamp defined (which happened to [...]]]></description> <content:encoded><![CDATA[<p>With WordPress 3.1 &#8211; we now have the ability to use &#8220;meta_query&#8221; to show posts associated with a certain custom field. I recently used this in order to create an events listing widget for a client.  I needed to query posts in the &#8220;Events&#8221; category and that had a time stamp defined (which happened to be the start date of the event).  The client wanted to show only current/future events (today or later) and wanted to show them in order by the closest event date to the furthest away.</p><p>Getting the general query together was a snap &#8211; but the orderby did not work unless I had the meta_key defined (this is documented but was overlooked initially).</p><p><strong>Example</strong></p><pre class="brush: php; title: Custom Code; notranslate">
$now = time();
$args = array(
	'category_name' =&amp;gt; 'Events',
	'meta_query' =&amp;gt; array(
		array(
			'key' =&amp;gt; 'sdac_event_time_stamp',
			'value' =&amp;gt; $now,
			'compare' =&amp;gt; '&amp;gt;=',
			'type' =&amp;gt; 'NUMERIC'
		)
	),
	'meta_key' =&amp;gt; 'sdac_event_time_stamp',
	'order' =&amp;gt; 'ASC',
	'orderby' =&amp;gt; 'meta_value_num'
 );
$events_query = new WP_Query( $args);
</pre><p>If you take a look at the query itself &#8211; the trick was to capture the time now ($now) and then use the compare within the meta_query.  Overall &#8211; this sort of query makes working with custom fields a lot easier.  If you have not checked it out yet &#8211; take a look.</p><p><strong>Documentation</strong><br
/> <a
href="http://codex.wordpress.org/Function_Reference/WP_Query" target="_blank">Function Reference/WP Query</a></p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2011/04/14/using-meta_query-with-wordpress-3-1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Remove &#8220;Private:&#8221; From WordPress Titles</title><link>http://www.sandboxdev.com/2008/01/14/remove-private-from-wordpress-titles/</link> <comments>http://www.sandboxdev.com/2008/01/14/remove-private-from-wordpress-titles/#comments</comments> <pubDate>Mon, 14 Jan 2008 18:09:00 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[functions.php]]></category> <category><![CDATA[WordPress function]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/blog/wordpress/2008/01/14/remove-private-from-wordpress-titles.php</guid> <description><![CDATA[I needed to be able filter out the text &#8220;Private:&#8221; for posts and pages that were password protected but did not want to edit any core WordPress files. To filter out that text, I added the following code into my functions.php file (within my theme directory): (I also posted this filter in the WordPress Support [...]]]></description> <content:encoded><![CDATA[<p>I needed to be able filter out the text &#8220;Private:&#8221; for posts and pages that were password protected but did not want to edit any core WordPress files. To filter out that text, I added the following code into my functions.php file (within my theme directory):</p><pre class="brush: php; title: Custom Code; notranslate">
function remove_private_prefix($title) {
$title = str_replace(
'Private:',
'',
$title);
return $title;
}
add_filter('the_title','remove_private_prefix');
</pre><p>(I also posted <a
href="http://wordpress.org/support/topic/116985">this filter</a> in the WordPress Support Forum)</p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2008/01/14/remove-private-from-wordpress-titles/feed/</wfw:commentRss> <slash:comments>41</slash:comments> </item> </channel> </rss>
