<?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>wpseek.com // blog</title>
	<atom:link href="http://wpseek.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpseek.com/blog</link>
	<description>A random code snippets blog</description>
	<lastBuildDate>Wed, 06 Jul 2011 17:44:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha</generator>
		<item>
		<title>Introducing the wpseek Bot</title>
		<link>http://wpseek.com/blog/2011/twitter-and-the-wpseek-bot/105/</link>
		<comments>http://wpseek.com/blog/2011/twitter-and-the-wpseek-bot/105/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 14:57:00 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[wpseek News]]></category>
		<category><![CDATA[Bot]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[wpseek]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=105</guid>
		<description><![CDATA[I&#8217;m not much of a tweeter. While I&#8217;m pretty much into WordPress, I&#8217;m not much of a blogger either. As long as anyone hasn&#8217;t come up with a thing called 48-hours-day, that&#8217;s not gonna change anytime soon. Introducing the wpseek Bot While I am not tweeting much, I hired a guy called &#8216;wpseek Bot&#8217;. Since [...]]]></description>
			<content:encoded><![CDATA[
<p>I&#8217;m not much of a tweeter. While I&#8217;m pretty much into WordPress, I&#8217;m not much of a blogger either. As long as anyone hasn&#8217;t come up with a thing called 48-hours-day, that&#8217;s not gonna change anytime soon.<span id="more-105"></span></p>
<h4>Introducing the wpseek Bot</h4>
<p>While I am not tweeting much, I hired a guy called &#8216;wpseek Bot&#8217;. Since wpseek.com went online sometime 2009, the wpseek Bot keeps the data updated that wpseek.com is based on. Namely functions, hooks, filters and all that comes with it. He&#8217;s a busy guy (called by crons every now and then), so here&#8217;s a brief overview on what he&#8217;s tweeting about with the wpseek Twitter account:</p>
<h4>WordPress development version updates <em>(Checked hourly)</em>:</h4>
<p><a href="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_devversion.jpg"><img class="alignleft size-medium wp-image-100" title="wpseek_twitter_devversion" src="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_devversion-300x162.jpg" alt="" width="300" height="162" /></a>Whenever the core devs update to a new development version, the wpseek Bot will keep you updated on Twitter.</p>
<p><br style="clear: both;" /></p>
<h4>New WordPress releases <em>(Checked hourly)</em>:</h4>
<p><a href="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_wpversion.jpg"><img class="size-medium wp-image-104 alignleft" title="wpseek_twitter_wpversion" src="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_wpversion-300x153.jpg" alt="" width="300" height="153" /></a>The Automattic guys just released another security release? Know when there&#8217;s a new WP version available to download.</p>
<p><br style="clear: both;" /></p>
<h4>New WordPress functions on wpseek.com <em>(Updated twice a week)</em>:</h4>
<p><a href="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_newfunc.jpg"><img class="alignleft size-medium wp-image-101" title="wpseek_twitter_newfunc" src="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_newfunc-300x171.jpg" alt="" width="300" height="171" /></a>As of now, you can browse through more than 5000 WordPress functions on wpseek.com. To keep data up-to-date, the wpseek Bot seeks for new WP functions regularly to add to the wpseek database. When there are new functions available, he will tweet about it.</p>
<p><br style="clear: both;" /></p>
<h4>New WordPress hooks/filters on wpseek.com <em>(Updated twice a week)</em>:</h4>
<p><a href="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_newhooks.jpg"><img class="alignleft size-medium wp-image-101" title="wpseek_twitter_newfunc" src="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_newhooks-300x155.jpg" alt="" width="300" height="171" /></a>Alongside WP functions you can find WP hooks and filters on wpseek.com. These are updated twice a week to keep you updated on the newest WP API stuff.</p>
<p><br style="clear: both;" /></p>
<h4>WordPress release reminder <em>(Updated once a month)</em>:</h4>
<p><a href="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_reminder.jpg"><img class="alignleft size-medium wp-image-103" title="wpseek_twitter_reminder" src="http://wpseek.com/blog/wp-content/uploads/2011/07/wpseek_twitter_reminder-300x171.jpg" alt="" width="300" height="171" /></a>Don&#8217;t know when to expect the upcoming WordPress release? Not sure if you&#8217;ll manage to get your plugin&#8217;s new version out before a new WP version will be released? The wpseek Bot will tell you once a month!<br />
<br style="clear: both;" /><br />
There are several more crons, parsers and updates running behind the scenes to keep the wpseek.com data stock up-to-date, but the 5 above are the most important and relevant for the random WP developer and designer.</p>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2011/twitter-and-the-wpseek-bot/105/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New hooks and filters added on 27/02/2011</title>
		<link>http://wpseek.com/blog/2011/new-hooks-and-filters-27-02-11/97/</link>
		<comments>http://wpseek.com/blog/2011/new-hooks-and-filters-27-02-11/97/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 07:55:11 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[wpseek News]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Hooks]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=97</guid>
		<description><![CDATA[New hooks and filters added on 27/02/2011: add_admin_bar_menus add_{$meta_type}_meta add_{$meta_type}_metadata admin_bar_init admin_bar_menu admin_title after_theme_row after_theme_row_{$theme_key} akismet_comment_nonce akismet_optimize_table akismet_show_user_comments_approved akismet_submit_nonspam_comment akismet_submit_spam_comment all_admin_notices all_themes bulk_actions-{$screen-&#62;id} can_edit_network comments_clauses custom_header_options default_hidden_meta_boxes delete_{$meta_type}_meta delete_{$meta_type}_metadata doing_it_wrong_run doing_it_wrong_trigger_error edit_profile_url edit_term_link enter_title_here esc_textarea force_filtered_html_on_import get_ancestors get_edit_term_link get_media_item_args get_meta_sql get_terms_args get_the_categories get_the_terms get_{$meta_type}_metadata in_theme_update_message-{$theme_key} is_post_type_hierarchical({$post-&#62;post_type} list_pages load-categoriesphp load-edit-link-categoriesphp load-page-newphp load-pagephp load_image_to_edit_attachmenturl load_image_to_edit_filesystempath login_enqueue_scripts login_footer [...]]]></description>
			<content:encoded><![CDATA[
<p>New hooks and filters added on 27/02/2011:<span id="more-97"></span></p>
<ul>
<li>add_admin_bar_menus</li>
<li>add_{$meta_type}_meta</li>
<li>add_{$meta_type}_metadata</li>
<li>admin_bar_init</li>
<li>admin_bar_menu</li>
<li>admin_title</li>
<li>after_theme_row</li>
<li>after_theme_row_{$theme_key}</li>
<li>akismet_comment_nonce</li>
<li>akismet_optimize_table</li>
<li>akismet_show_user_comments_approved</li>
<li>akismet_submit_nonspam_comment</li>
<li>akismet_submit_spam_comment</li>
<li>all_admin_notices</li>
<li>all_themes</li>
<li>bulk_actions-{$screen-&gt;id}</li>
<li>can_edit_network</li>
<li>comments_clauses</li>
<li>custom_header_options</li>
<li>default_hidden_meta_boxes</li>
<li>delete_{$meta_type}_meta</li>
<li>delete_{$meta_type}_metadata</li>
<li>doing_it_wrong_run</li>
<li>doing_it_wrong_trigger_error</li>
<li>edit_profile_url</li>
<li>edit_term_link</li>
<li>enter_title_here</li>
<li>esc_textarea</li>
<li>force_filtered_html_on_import</li>
<li>get_ancestors</li>
<li>get_edit_term_link</li>
<li>get_media_item_args</li>
<li>get_meta_sql</li>
<li>get_terms_args</li>
<li>get_the_categories</li>
<li>get_the_terms</li>
<li>get_{$meta_type}_metadata</li>
<li>in_theme_update_message-{$theme_key}</li>
<li>is_post_type_hierarchical({$post-&gt;post_type}</li>
<li>list_pages</li>
<li>load-categoriesphp</li>
<li>load-edit-link-categoriesphp</li>
<li>load-page-newphp</li>
<li>load-pagephp</li>
<li>load_image_to_edit_attachmenturl</li>
<li>load_image_to_edit_filesystempath</li>
<li>login_enqueue_scripts</li>
<li>login_footer</li>
<li>manage_plugins_custom_column</li>
<li>manage_sites_action_links</li>
<li>manage_sites_custom_column</li>
<li>manage_themes_custom_column</li>
<li>manage_{$post-&gt;post_type}_posts_custom_column</li>
<li>manage_{$screen-&gt;id}_sortable_columns</li>
<li>manage_{$screen-&gt;taxonomy}_custom_column</li>
<li>mature_blog</li>
<li>media_upload_mime_type_links</li>
<li>ms_user_list_site_actions</li>
<li>nav_menu_item_id</li>
<li>network_admin_edit_{$_GET[action]}</li>
<li>network_admin_menu</li>
<li>network_admin_notices</li>
<li>network_sites_updated_message_{$_REQUEST[action]}</li>
<li>network_site_users_after_list_table</li>
<li>posts_clauses</li>
<li>posts_clauses_request</li>
<li>posts_search</li>
<li>post_comment_status_meta_box-options</li>
<li>post_format_rewrite_base</li>
<li>post_type_archive_feed_link</li>
<li>post_type_archive_link</li>
<li>post_type_archive_title</li>
<li>pre_get_comments</li>
<li>pre_user_query</li>
<li>schedule_event</li>
<li>secure_auth_cookie</li>
<li>secure_auth_redirect</li>
<li>secure_logged_in_cookie</li>
<li>secure_signon_cookie</li>
<li>show_admin_bar</li>
<li>show_network_site_users_add_existing_form</li>
<li>show_network_site_users_add_new_form</li>
<li>show_recent_comments_widget_style</li>
<li>single_term_title</li>
<li>swfupload_post_params</li>
<li>swfupload_success_handler</li>
<li>terms_clauses</li>
<li>theme_action_links_{$theme_key}</li>
<li>theme_row_meta</li>
<li>the_comments</li>
<li>tiny_mce_preload_dialogs</li>
<li>twentyten_attachment_height</li>
<li>unmature_blog</li>
<li>update_{$meta_type}_metadata</li>
<li>user_admin_menu</li>
<li>user_admin_notices</li>
<li>user_admin_url</li>
<li>user_dashboard_url</li>
<li>use_default_gallery_style</li>
<li>views_{$screen-&gt;id}</li>
<li>wp_admin_bar_class</li>
<li>wp_after_admin_bar_render</li>
<li>wp_before_admin_bar_render</li>
<li>wp_get_current_commenter</li>
<li>wp_insert_post_parent</li>
<li>wp_nav_menu_objects</li>
<li>wp_network_dashboard_setup</li>
<li>wp_network_dashboard_widgets</li>
<li>wp_unique_post_slug_is_bad_attachment_slug</li>
<li>wp_unique_post_slug_is_bad_flat_slug</li>
<li>wp_unique_post_slug_is_bad_hierarchical_slug</li>
<li>wp_update_term_parent</li>
<li>wp_user_dashboard_setup</li>
<li>wp_user_dashboard_widgets</li>
<li>wp_xmlrpc_server_class</li>
<li>_network_admin_menu</li>
<li>_user_admin_menu</li>
<li>{$permastructname}_rewrite_rules</li>
<li>{$prefix}plugin_action_links</li>
<li>{$prefix}plugin_action_links_{$plugin_file}</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2011/new-hooks-and-filters-27-02-11/97/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom Post Type Pagination</title>
		<link>http://wpseek.com/blog/2011/custom-post-type-pagination/89/</link>
		<comments>http://wpseek.com/blog/2011/custom-post-type-pagination/89/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 16:07:28 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[Custom Post Type]]></category>
		<category><![CDATA[Pagination]]></category>
		<category><![CDATA[Post]]></category>
		<category><![CDATA[WP-PageNavi]]></category>
		<category><![CDATA[WP_Query]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=89</guid>
		<description><![CDATA[The problem I was just messing around with a custom post type loop,  and noticed that pagination wasn&#8217;t showing up at all. Neither posts_nav_link() nor the WP-PageNavi plugin was working and showing up navigation links. I was basically using a custom WP_Query like this: The solution Just make sure to put your pagination function call [...]]]></description>
			<content:encoded><![CDATA[
<h4>The problem</h4>
<p>I was just messing around with a custom post type loop,  and noticed that pagination wasn&#8217;t showing up at all. Neither <a title="posts_nav_link on wpseek.com" href="http://wpseek.com/posts_nav_link/" target="_blank">posts_nav_link()</a> nor the <a title="WP-PageNavi" href="http://wordpress.org/extend/plugins/wp-pagenavi/" target="_blank">WP-PageNavi</a> plugin was working and showing up navigation links.<span id="more-89"></span></p>
<p>I was basically using a custom WP_Query like this:</p>
<pre class="brush: php; title: ; notranslate">$custom_query = new WP_Query( $args );
while ($custom_query-&gt;have_posts()) :
...</pre>
<h4>The solution</h4>
<pre class="brush: php; highlight: [5]; title: ; notranslate">global $wp_query;
$clone_page_total = $wp_query-&gt;max_num_pages;
$wp_query-&gt;max_num_pages = $custom_query-&gt;max_num_pages;

wp_pagenavi();

$wp_query-&gt;max_num_pages = $clone_page_total;
</pre>
<p>Just make sure to put your pagination function call (<em>wp_pagenavi()</em> in this case) before we restore the $wp_query property to it&#8217;s original value (in line 7).</p>
<h4>What does it do?</h4>
<p>The problem is that WordPress pagination functions need the <em>$wp_query</em> object. They don&#8217;t care for a custom <em>$custom_query</em> object. We basically just pretend there is a <em>$wp_query</em> object by cloning the needed property <em>max_num_pages</em> to <em>$wp_query</em>.</p>
<h4>Requirements</h4>
<ul>
<li>WordPress 3.0 (if you use custom post types)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2011/custom-post-type-pagination/89/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to get the Meta ID by Meta Key</title>
		<link>http://wpseek.com/blog/2010/how-to-get-the-meta-id-by-meta-key/80/</link>
		<comments>http://wpseek.com/blog/2010/how-to-get-the-meta-id-by-meta-key/80/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 19:09:04 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[ID]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[meta_id]]></category>
		<category><![CDATA[meta_key]]></category>
		<category><![CDATA[wpdb]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=80</guid>
		<description><![CDATA[The problem Well, I guess it&#8217;s not too often that you need to get the ID of a particular meta entry from the postmeta table in WordPress. However, Matthew on the wp-hackers mailing list needed exactly that. The solution So here&#8217;s a function to get the ID of a meta entry based on the given [...]]]></description>
			<content:encoded><![CDATA[
<h4>The problem</h4>
<p>Well, I guess it&#8217;s not too often that you need to get the ID of a particular meta entry from the postmeta table in WordPress. However, Matthew on the wp-hackers mailing list <a href="http://lists.automattic.com/pipermail/wp-hackers/2010-January/029798.html" target="_blank">needed exactly that</a>.<span id="more-80"></span></p>
<h4>The solution</h4>
<p>So here&#8217;s a function to get the ID of a meta entry based on the given meta_key:</p>
<pre class="brush: php; title: ; notranslate">function get_mid_by_key( $post_id, $meta_key ) {
  global $wpdb;
  $mid = $wpdb-&gt;get_var( $wpdb-&gt;prepare(&quot;SELECT meta_id FROM $wpdb-&gt;postmeta WHERE post_id = %d AND meta_key = %s&quot;, $post_id, $meta_key) );
  if( $mid != '' )
    return (int)$mid;

  return false;
}</pre>
<h4>What does it do?</h4>
<p>The function returns the ID of the meta entry in the postmeta table or <em>false</em> if no results are returned. Invoke the function like so:</p>
<pre class="brush: php; title: ; notranslate">get_mid_by_key( your_post_id, 'your_meta_key' );</pre>
<h4>Requirements</h4>
<ul>
<li>WordPress 2.3 and above</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2010/how-to-get-the-meta-id-by-meta-key/80/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Display Custom User Fields on Edit Users Screen</title>
		<link>http://wpseek.com/blog/2010/display-custom-user-fields-on-edit-users-screen/61/</link>
		<comments>http://wpseek.com/blog/2010/display-custom-user-fields-on-edit-users-screen/61/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 14:34:59 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Plugin Hacks]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom field]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=61</guid>
		<description><![CDATA[The problem Anyone who would like to add a column to the edit users screen in the admin panel, listing a custom field like the age or membership status of a user, take a look. The solution Here&#8217;s a basic working example plugin. Just add a folder &#8216;user-column&#8217; to the plugins folder, put a file [...]]]></description>
			<content:encoded><![CDATA[
<h4>The problem</h4>
<p>Anyone who would like to add a column to the edit users screen in the admin panel, listing a custom field like the age or membership status of a user, take a look.<span id="more-61"></span></p>
<h4>The solution</h4>
<p>Here&#8217;s a basic working example plugin. Just add a folder &#8216;user-column&#8217; to the plugins folder, put a file &#8216;user-column.php&#8217; into this folder and paste the following code into the file:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
/*
Plugin Name: Custom User Column
Version: 0.7
Plugin URI: http://www.wpquestions.com/question/show/id/74
Description: WordPress 2.8+ only - Display Custom User Fields on Edit Users Screen
Author: Oliver Schlöbe
Author URI: http://wpseek.com/
*/

function cuc_column_userfield( $defaults ) {
  $defaults['cuc-usercolumn-userfield'] = __('Age', 'user-column');
  return $defaults;
}

function cuc_custom_column_userfield($value, $column_name, $id) {
  if( $column_name == 'cuc-usercolumn-userfield' ) {
    //if ( current_user_can('edit_users') ) // uncomment this to add a capability check
      return get_usermeta($id, 'age'); // 'age' is the custom meta key
  }
}

add_action('manage_users_custom_column', 'cuc_custom_column_userfield', 15, 3);
add_filter('manage_users_columns', 'cuc_column_userfield', 15, 1);
?&gt;</pre>
<h4>What does it do?</h4>
<p>The plugin adds a column &#8220;Age&#8221; to the user listing page displaying a custom user meta key &#8216;age&#8217;. Change it for whatever custom meta key you like.</p>
<h4>Requirements</h4>
<ul>
<li>WordPress 2.8</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2010/display-custom-user-fields-on-edit-users-screen/61/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get ID of parent category</title>
		<link>http://wpseek.com/blog/2009/get-id-of-parent-category/49/</link>
		<comments>http://wpseek.com/blog/2009/get-id-of-parent-category/49/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:59:44 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[ID]]></category>
		<category><![CDATA[parent]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=49</guid>
		<description><![CDATA[The problem Sometimes you need to get the ID of the parent category when you&#8217;re browsing a child category page. Don&#8217;t you? The solution Get the ID of the parent category with a few lines of PHP code: Requirements WordPress 1.5.1 and above]]></description>
			<content:encoded><![CDATA[
<h4>The problem</h4>
<p>Sometimes you need to get the ID of the parent category when you&#8217;re browsing a child category page. Don&#8217;t you? <img src='http://wpseek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-49"></span></p>
<h4>The solution</h4>
<p>Get the ID of the parent category with a few lines of PHP code:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
if( is_category() ) {
  $q_cat = get_query_var('cat');
  $cat = get_category( $q_cat );
  echo $cat-&gt;category_parent; // Print the ID
}
?&gt;</pre>
<h4>Requirements</h4>
<ul>
<li>WordPress 1.5.1 and above</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2009/get-id-of-parent-category/49/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Check if bookmarks exist on your blog</title>
		<link>http://wpseek.com/blog/2009/check-if-bookmarks-exist-on-your-blog/39/</link>
		<comments>http://wpseek.com/blog/2009/check-if-bookmarks-exist-on-your-blog/39/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:38:55 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=39</guid>
		<description><![CDATA[The problem Wished you could check if any bookmarks exist on your blog? The solution Here&#8217;s how. Five lines of PHP Code: What does it do? We use the function get_bookmarks() to count the number of bookmarks. If it returns 0, there are no bookmarks. Pretty easy, huh? Requirements WordPress 2.1 and above]]></description>
			<content:encoded><![CDATA[
<h4>The problem</h4>
<p>Wished you could check if any bookmarks exist on your blog?<span id="more-39"></span></p>
<h4>The solution</h4>
<p>Here&#8217;s how. Five lines of PHP Code:</p>
<pre class="brush: php; title: ; notranslate">$bm = get_bookmarks(array());
$bm_count = count($bm);
if($bm_count &gt; 0) {
  wp_list_bookmarks('title_li=');
}</pre>
<h4>What does it do?</h4>
<p>We use the function get_bookmarks() to count the number of bookmarks. If it returns 0, there are no bookmarks. Pretty easy, huh?</p>
<h4>Requirements</h4>
<ul>
<li>WordPress 2.1 and above</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2009/check-if-bookmarks-exist-on-your-blog/39/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto-Tag 800+ posts with &#8220;Auto Tags&#8221; &#8211; automatically</title>
		<link>http://wpseek.com/blog/2009/auto-tag-800-posts-with-auto-tags-automatically/23/</link>
		<comments>http://wpseek.com/blog/2009/auto-tag-800-posts-with-auto-tags-automatically/23/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 21:32:31 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Plugin Hacks]]></category>
		<category><![CDATA[auto tag]]></category>
		<category><![CDATA[auto tags]]></category>
		<category><![CDATA[max execution time]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=23</guid>
		<description><![CDATA[The problem How to auto-tag your posts with the plugin &#8220;Auto Tags&#8221; after they&#8217;ve been published already without manually edit and save each post to get them auto-tagged? Additionally, you don&#8217;t have SSH access to your server and the PHP max_execution_time is limited to 30 or 60 seconds so a script&#8217;s runtime would exceed and [...]]]></description>
			<content:encoded><![CDATA[
<h4>The problem</h4>
<p>How to auto-tag your posts with the plugin &#8220;Auto Tags&#8221; after they&#8217;ve been published already without manually edit and save each post to get them auto-tagged? Additionally, you don&#8217;t have SSH access to your server and the PHP max_execution_time is limited to 30 or 60 seconds so a script&#8217;s runtime would exceed and result in a blank page or fatal error?<span id="more-23"></span></p>
<h4>The solution</h4>
<p>Put a file auto-tag.php (or whatever you&#8217;d like) in your WP document root and fill it with the following contents:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', '1');

define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
global $wpdb;

if( !isset($_GET['offset']) ) {
  $offset = (int)$_GET['offset'];
}

$all_post_ids = $wpdb-&gt;get_col(&quot;SELECT ID FROM $wpdb-&gt;posts WHERE post_type = 'post'&quot;);
$post_ids = $wpdb-&gt;get_col(&quot;SELECT ID FROM $wpdb-&gt;posts WHERE post_type = 'post' ORDER BY ID ASC LIMIT &quot; . $_GET['offset'] . &quot;,3&quot;);

if( $_GET['offset'] &gt;= count($all_post_ids) ) {
  die('Done.');
  exit;
}

foreach( $post_ids as $post_id ) {
  do_action( 'wp_insert_post', $post_id );
}
$offset = $_GET['offset']+3;
echo '&lt;meta http-equiv=&quot;refresh&quot; content=&quot;2; url=' . $_SERVER['SCRIPT_NAME'] . '?offset=' . $offset . '&quot;&gt;';
?&gt;</pre>
<h4>What does it do?</h4>
<p>To avoid the script being aborted due to the PHP max_execution_time, the above script auto-tags 3 posts at a time, then automatically reloads the page, auto-tags the next 3 posts and so on. All you have to do is watch the script do the work for you, and get a coffee.</p>
<h4>Requirements</h4>
<ul>
<li>WordPress 2.0 and above</li>
<li>Plugin <a href="http://wordpress.org/extend/plugins/auto-tag/" target="_blank">Auto-Tags</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2009/auto-tag-800-posts-with-auto-tags-automatically/23/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>So, another blog &#8211; or not?</title>
		<link>http://wpseek.com/blog/2009/so-another-blog-or-not/14/</link>
		<comments>http://wpseek.com/blog/2009/so-another-blog-or-not/14/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 20:26:20 +0000</pubDate>
		<dc:creator>wpseek (admin)</dc:creator>
				<category><![CDATA[wpseek News]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[support forums]]></category>

		<guid isPermaLink="false">http://wpseek.com/blog/?p=14</guid>
		<description><![CDATA[Yeah, seems like… but, there’s a but, I guess. I’ll make it short and sweet: I’ve been hanging around in the german WordPress Support forums as a moderator pretty often and try to help out people with their WordPress problems. As such, I’ve been coming across some tricky WordPress issues I tried to solve with [...]]]></description>
			<content:encoded><![CDATA[
<p>Yeah, seems like… but, there’s a but, I guess.</p>
<p>I’ll make it short and sweet: I’ve been hanging around in the <a href="http://forum.wordpress-deutschland.org/">german WordPress Support forums</a> as a moderator pretty often and try to help out people with their WordPress problems. As such, I’ve been coming across some tricky WordPress issues I tried to solve with the forum peeps, and these solutions I’m going to store in here. That&#8217;s it and that&#8217;s what this blog is for.<span id="more-14"></span></p>
<p>Chances are high that most people won’t need most of the stuff here, however for some this blog might be of value… eventually. Keep in mind that the problems and solutions discussed here are <em>individual demands</em> on the german WP forums, means, they helped at least one person (but I guess the number won’t increase <img src='http://wpseek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), and are tested to work properly. But they are <em>not</em> going to heal cancer or something.</p>
<p>I won&#8217;t update the blog regularly. It depends on the user&#8217;s problems they &#8220;provide&#8221; in the forums, but every now and then I&#8217;ll try to update the blog.</p>
<p>So, happy blogging&#8230; to me.</p>

]]></content:encoded>
			<wfw:commentRss>http://wpseek.com/blog/2009/so-another-blog-or-not/14/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

