<?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>Wordpress API &#187; wordpress tutorials</title>
	<atom:link href="http://wordpressapi.com/category/wordpress/wordpress-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://wordpressapi.com</link>
	<description>Wordpress Tutorials, Tips, Code, Hacks, Themes, plugin, Developer Code book -Wordpress Code, Themes, Plugins, Tips, Tutorials, News, Releases, Designs, Hacks, Tricks, Blog</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:17:21 +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>add javascript and css files into wordpress theme</title>
		<link>http://wordpressapi.com/2012/02/06/add-javascript-and-css-files-into-wordpress-theme/</link>
		<comments>http://wordpressapi.com/2012/02/06/add-javascript-and-css-files-into-wordpress-theme/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 18:17:20 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=7004</guid>
		<description><![CDATA[http://wordpressapi.com/2012/02/06/add-javascript-and-css-files-into-wordpress-theme/Many developers want to add the javascript and css files into wordpress themes. You just need to add following code into functions.php file. You just need to replace Your theme name and javascript and css file name. Follow us on &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2012/02/06/add-javascript-and-css-files-into-wordpress-theme/<p>Many developers want to add the javascript and css files into wordpress themes. You just need to add following code into functions.php file.</p>
<pre class="brush: php; title: ; notranslate">
// Register your javascript for properties
function admin_your_javascript(){
    global $post;
    if($post-&gt;post_type == 'post-type' &amp;&amp; is_admin()) {
        wp_enqueue_script('YOUR-JS', WP_CONTENT_URL . '/themes/YOUR-THEME/js/YOUR-JS.js');

    }
}
add_action('admin_print_scripts', 'admin_your_javascript');

// Register your styles for properties
function admin_your_styles(){
    global $post;
    if($post-&gt;post_type == 'post-type' &amp;&amp; is_admin()) {
        wp_enqueue_style('YOUR-CSS', WP_CONTENT_URL . '/themes/YOUR-THEME/css/YOUR-CSS.css');
    }
}
add_action('admin_print_styles', 'admin_your_styles');
</pre>
<p>You just need to replace Your theme name and javascript and css file name.</p>
<div id="attachment_7005" class="wp-caption alignnone<a href="http://wordpressapi.com/2012/02/06/add-javascript-and-css-files-into-wordpress-theme/wordpressapi-wp-css-js/" rel="attachment wp-att-7005"><img class="size-medium wp-image-7005" title="add javascript and css files into wordpress theme" src="http://images.wordpressapi.com/wordpressapi-wp-css-js-300x179.jpg" alt="add javascript and css files into wordpress theme" width="300" height="179" /></a><p class="wp-caption-text">add javascript and css files into wordpress theme</p></div>
<p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2012/02/06/add-javascript-and-css-files-into-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to include the jquery-ui in wordpress</title>
		<link>http://wordpressapi.com/2012/01/18/how-to-include-jquery-ui-in-wordpress/</link>
		<comments>http://wordpressapi.com/2012/01/18/how-to-include-jquery-ui-in-wordpress/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 16:46:25 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[Wordpress Themes]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[wp]]></category>
		<category><![CDATA[wp theme]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6996</guid>
		<description><![CDATA[http://wordpressapi.com/2012/01/18/how-to-include-jquery-ui-in-wordpress/When you enqueue your script, it enqueues for the whole site including admin panel. If you don&#8217;t want the script in the admin panel, you can only include them for the site in frontend. This following code you need to &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2012/01/18/how-to-include-jquery-ui-in-wordpress/<p>When you enqueue your script, it enqueues for the whole site including admin panel. If you don&#8217;t want the script in the admin panel, you can only include them for the site in frontend.</p>
<p>This following code you need to add in functions.php file.</p>
<pre class="brush: php; title: ; notranslate">
function my_add_frontend_scripts() {
    if( ! is_admin() ) {
        wp_enqueue_script('jquery');
        wp_enqueue_script('jquery-ui-core');
    }
}
add_action('init', 'my_add_frontend_scripts');
</pre>
<p>Then you are able to see the jquery-ui in your wordpress theme.<a href="http://wordpressapi.com/2011/02/02/jquery-tips-wordpress-theme-developers/add-jquery-wordpress/" rel="attachment wp-att-6081"><img src="http://images.wordpressapi.com/add-jquery-wordpress-300x94.jpg" alt="" title="add-jquery-wordpress" width="300" height="94" class="alignnone size-medium wp-image-6081" /></a></p>
<p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2012/01/18/how-to-include-jquery-ui-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Send email through wp_mail in html format with wordpress</title>
		<link>http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/</link>
		<comments>http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 09:59:54 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6986</guid>
		<description><![CDATA[http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/In wordpress we use the wp_mail function for sending email. Following parameters we use for wp_mail Parameters Simple example: We can use this code for contact form or in functions.php file For html format email from wordpress. we just need &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/<p>In wordpress we use the wp_mail function for sending email. Following parameters we use for wp_mail</p>
<p><!--?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?--><br />
Parameters</p>
<pre class="brush: php; title: ; notranslate">
$to
    (string or array) (required) The intended recipient(s). Multiple recipients may be specified using an array or a comma-separated string.

$subject
    (string) (required) The subject of the message.

$message
    (string) (required) Message content.

$headers
    (string or array) (optional) Mail headers to send with the message. (advanced)

$attachments
    (string or array) (optional) Files to attach: a single filename, an array of filenames, or a newline-delimited string list of multiple filenames. (advanced)
</pre>
<p>Simple example:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
   $attachments = array(WP_CONTENT_DIR . '/uploads/file_to_attach.zip');
   $headers = 'From: My Name &lt;myname@mydomain.com&gt;' . &quot;\r\n&quot;;
   wp_mail('test@test.com', 'subject', 'message', $headers, $attachments);
?&gt;
</pre>
<div id="attachment_6987" class="wp-caption alignnone<a href="http://wordpressapi.com/?attachment_id=6987" rel="attachment wp-att-6987"><img class="size-medium wp-image-6987" title="Send email through wp_mail in html format with wordpress" src="http://images.wordpressapi.com/wordpress-html-email-300x179.jpg" alt="Send email through wp_mail in html format with wordpress" width="300" height="179" /></a><p class="wp-caption-text">Send email through wp_mail in html format with wordpress</p></div>
<p>We can use this code for contact form or in functions.php file</p>
<p>For html format email from wordpress. we just need to add following line in functions.php file.</p>
<pre class="brush: php; title: ; notranslate">
add_filter('wp_mail_content_type',create_function('', 'return &quot;text/html&quot;;'));
</pre>
<p>Sending HTML email has risks. It could be caught in spam filters. The client may not support HTML formatting (although that&#8217;s rare). The client may disable email HTML from using javascript, CSS or grabbing remote assets like images.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/" title="html form using wp_mail">html form using wp_mail</a></li><li><a href="http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/" title="wp_mail not sending">wp_mail not sending</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2012/01/06/send-email-through-wp_mail-in-html-format-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>how to integrate the wordpress with php or html</title>
		<link>http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/</link>
		<comments>http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 17:10:50 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6974</guid>
		<description><![CDATA[http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/WordPress is very easy to work on. you can very easily integrate the wordpress with php or html site. There may be only a few features of WordPress you want to use when integrating it with your site, or you &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/<p>WordPress is very easy to work on. you can very easily integrate the wordpress with php or html site. There may be only a few features of WordPress you want to use when integrating it with your site, or you may want your entire site run with WordPress. This tutorial will guide you through making your WordPress site look like your current design.</p>
<p>How to start?<br />
First you need to disable the wordpress theme. using following code.</p>
<p>open your header.php file from your wordpress theme and put following code in that file.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/* Short and sweet */
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
?&gt;
</pre>
<p>Create any php file and put following code in that file.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
require('/the/path/to/your/wp-blog-header.php');
?&gt;
</pre>
<p>In the event you want to show ten posts sorted alphabetically in ascending order on your web page, you could do the following to grab the posted date, title and excerpt:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
require('/the/path/to/your/wp-blog-header.php');
?&gt;

&lt;?php
$posts = get_posts('numberposts=10&amp;order=ASC&amp;orderby=post_title');
foreach ($posts as $post) : start_wp(); ?&gt;
&lt;?php the_date(); echo &quot;&lt;br /&gt;&quot;; ?&gt;
&lt;?php the_title(); ?&gt;
&lt;?php the_excerpt(); ?&gt;
&lt;?php
endforeach;
?&gt;
</pre>
<div id="attachment_6975" class="wp-caption alignnone<a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/convert-html-to-wordpress/" rel="attachment wp-att-6975"><img class="size-medium wp-image-6975" title="how to integrate the wordpress with php or html" src="http://images.wordpressapi.com/Convert-HTML-to-Wordpress-300x214.jpg" alt="how to integrate the wordpress with php or html" width="300" height="214" /></a><p class="wp-caption-text">how to integrate the wordpress with php or html</p></div>
<p>For more information you can write to me.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="including wp-blog-header php wordpress 3 3">including wp-blog-header php wordpress 3 3</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="integrating wordpress in site html">integrating wordpress in site html</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="how to integrate api for wordpress">how to integrate api for wordpress</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="how to integrate wp in to phpbb design">how to integrate wp in to phpbb design</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="html to php for wordpress">html to php for wordpress</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="integrate wordpress terms in php">integrate wordpress terms in php</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="qtranslate sort custom post alphabetical">qtranslate sort custom post alphabetical</a></li><li><a href="http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/" title="tutorials for integrating wordpress in iphone">tutorials for integrating wordpress in iphone</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/12/06/how-to-integrate-the-wordpress-with-php-or-html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Solved for WordPress old and new versions &#8211; PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted</title>
		<link>http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/</link>
		<comments>http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 18:16:01 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6944</guid>
		<description><![CDATA[http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/We got always following ERROR PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10485761 bytes) in This issue with old and new wordpress versions both. First you need to increase memory limit for your php &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/<pre>We got always following ERROR

PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 10485761 bytes) in

This issue with old and new wordpress versions both. First you need to increase memory limit for your php package.

Use following method for increase the memory for php.

Open php configuration file.

# vim /etc/php.ini
Change following sections:
<pre class="brush: php; title: ; notranslate">
max_execution_time = 300     ; Maximum execution time of each script, in seconds
max_input_time = 300    ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M      ; Maximum amount of memory a script may consume (16MB)
</pre>
<p>I know on 2.5.1 i needed to increase the memdory, but i don't know how in 2.6. in the wp-config.php there no define to increase memory.</p>
<p>If you are using old wordpress version less then wordpress 2.6 version or you are using the wordpress MU then use following code.</p>
<p>open your wp-settings.php file from root folder and change following line</p>
<pre class="brush: php; title: ; notranslate">
if ( !defined('WP_MEMORY_LIMIT') )
        define('WP_MEMORY_LIMIT', '32M');
</pre>
<p>to</p>
<pre class="brush: php; title: ; notranslate">
if ( !defined('WP_MEMORY_LIMIT') )
        define('WP_MEMORY_LIMIT', '128M');
</pre>
<p>If you are using the newer wordpress version greater then 2.7 then use following method.<br />
Following URL is also helpful<br />
http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP</p>
<p>Edit wp-config.php and enter the following line<br />
define('WP_MEMORY_LIMIT', '64M');</p>
<p>If you are using the shared hosting then use following method.</p>
<p>   1. Create a file called php.ini in the root of your site (if you are using a hosted addon domain, this must be in the subdirectory of that site)<br />
   2. In php.ini, enter a line that says<br />
      memory_limit = 64MB<br />
   3. In your site's .htaccess (being a WordPress blog, I'm assuming there is one), enter the following line<br />
      SetEnv PHPRC /&lt;unix path to the directory where php.ini is&gt;/<br />
      (keep the slashes)<br />
   4. Edit wp-config.php and enter the following line<br />
      define('WP_MEMORY_LIMIT', '64M');<br />
   5. Upload the new files to the server</p>
<p>Oh, and don't tell your hosting provider you've done this... </p>
<p>This will solve your issue.</pre>
<div id="attachment_6945" class="wp-caption alignnone<a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/fatal_error/" rel="attachment wp-att-6945"><img class="size-medium wp-image-6945" title="Solved for WordPress old and new versions - PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted" src="http://images.wordpressapi.com/fatal_error-264x300.jpg" alt="Solved for WordPress old and new versions - PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted" width="264" height="300" /></a><p class="wp-caption-text">Solved for WordPress old and new versions - PHP Fatal error: Allowed memory size of 33554432 bytes exhausted</p></div>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="wordpress 3 3 Allowed memory size bytes exhausted">wordpress 3 3 Allowed memory size bytes exhausted</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="allowed memory size nginx wordpress">allowed memory size nginx wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="qtranslate allow memory php">qtranslate allow memory php</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="qtranslate fatal error: allowed memory size">qtranslate fatal error: allowed memory size</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="upload video php xhr php fatal error: allowed memory size">upload video php xhr php fatal error: allowed memory size</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="wordpress 3 3 allowed memory size of 33554432 bytes exhausted">wordpress 3 3 allowed memory size of 33554432 bytes exhausted</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="wordpress comment image allowed memory size">wordpress comment image allowed memory size</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="wordpress fatal error when uploading custom background">wordpress fatal error when uploading custom background</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="wordpress fatal error: allowed memory size of 33554432 bytes exhausted (tried to allocate 300 bytes)">wordpress fatal error: allowed memory size of 33554432 bytes exhausted (tried to allocate 300 bytes)</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="wordpress memory error formatting php">wordpress memory error formatting php</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="PHP Fatal error: Allowed memory size of wp 3 3">PHP Fatal error: Allowed memory size of wp 3 3</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="php fatal error: allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes)">php fatal error: allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes)</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="nginx Fatal error: Allowed memory exhausted">nginx Fatal error: Allowed memory exhausted</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="delicious magazine memory allowed">delicious magazine memory allowed</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="fatal error allowed memory size of wordpress 3 3">fatal error allowed memory size of wordpress 3 3</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="fatal error allowed memory size wordpress 3 3">fatal error allowed memory size wordpress 3 3</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="Fatal error: Allowed memory size of 33554432 bytes exhausted">Fatal error: Allowed memory size of 33554432 bytes exhausted</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1966080 bytes) in /home/serkin/public_html/ink-shop com ua/blog/wp-includes/class-simplepie php on line 5410">Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1966080 bytes) in /home/serkin/public_html/ink-shop com ua/blog/wp-includes/class-simplepie php on line 5410</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) et /libraries/joomla/database/database/mysql php">Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) et /libraries/joomla/database/database/mysql php</a></li><li><a href="http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/" title="fatal error: Allowed memory size of 33554432 bytes nginx php">fatal error: Allowed memory size of 33554432 bytes nginx php</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/11/21/solved-for-wordpress-old-and-new-versions-php-fatal-error-allowed-memory-size-33554432-bytes-exhausted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>solved: pagination for Custom post type not working</title>
		<link>http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/</link>
		<comments>http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 15:06:26 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[custom post type]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6940</guid>
		<description><![CDATA[http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/Some people asked me about pagination of custom post type. That is very easy. For showing the custom post type we always use the query_post method. Just use the following code in your template or theme file. Have fun! Incoming &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/<pre>Some people asked me about pagination of custom post type. That is very easy.</pre>
<p>For showing the custom post type we always use the query_post method.</p>
<p>Just use the following code in your template or theme file.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php get_header(); ?&gt;

            &lt;?php  query_posts( 'post_type=custom-post-type&amp;paged='.$paged );
                                    if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

loop here

              			&lt;?php endwhile; ?&gt;
				  &lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&gt;
					&lt;div class=&quot;nav-previous&quot;&gt;&lt;?php next_posts_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older posts', 'twentyten' ) ); ?&gt;&lt;/div&gt;
					&lt;div class=&quot;nav-next&quot;&gt;&lt;?php previous_posts_link( __( 'Newer posts &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
				  &lt;/div&gt;&lt;!-- #nav-below --&gt;
				  &lt;?php endif; wp_reset_query(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<div id="attachment_6941" class="wp-caption aligncenter<a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/custom-post-type-wordpress1/" rel="attachment wp-att-6941"><img class="size-full wp-image-6941 " title="solved: pagination for Custom post type not working" src="http://images.wordpressapi.com/custom-post-type-wordpress1.gif" alt="solved: pagination for Custom post type not working" width="300" height="250" /></a><p class="wp-caption-text">solved: pagination for Custom post type not working</p></div>
<p>Have fun!</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom post type ui archive pagination">custom post type ui archive pagination</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom post type archives wordpress 3 3">custom post type archives wordpress 3 3</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="next article in custom post type">next article in custom post type</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom paging for custom post type ajax">custom paging for custom post type ajax</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="qtranslate previous_posts_link">qtranslate previous_posts_link</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="query_posts and pagination not working with custom taxonomy posts wordpress">query_posts and pagination not working with custom taxonomy posts wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress 3 3 pagination on custom query">wordpress 3 3 pagination on custom query</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress 3 3 pagination problem">wordpress 3 3 pagination problem</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress 3 3 paging">wordpress 3 3 paging</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress custom post type pagination not showing">wordpress custom post type pagination not showing</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress custom post type pagination not working">wordpress custom post type pagination not working</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress custom post type previous_post_link">wordpress custom post type previous_post_link</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="wordpress javascript pagination">wordpress javascript pagination</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="qtranslate next_post_link">qtranslate next_post_link</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="qtranslate custom slug">qtranslate custom slug</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom post type archive with pagination">custom post type archive with pagination</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom post type pagination not showing">custom post type pagination not showing</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom post type pagination post nav link ?">custom post type pagination post nav link ?</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom post type ui qtranslate">custom post type ui qtranslate</a></li><li><a href="http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/" title="custom taxonomy wordpress pagination is not working">custom taxonomy wordpress pagination is not working</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/11/17/solved-pagination-for-custom-post-type-not-working/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to remove first image from wordpress post with caption if caption is present</title>
		<link>http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/</link>
		<comments>http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 17:59:03 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6933</guid>
		<description><![CDATA[http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/I struggled lot for this issue. Some times I only removed the first image. some times I removed first caption. I used the following code for first image removing. But I faced the some issues with that code. When first &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/<pre>I struggled lot for this issue. Some times I only removed the first image. some times I removed first caption.</pre>
<p>I used the following code for first image removing.</p>
<pre class="brush: php; title: ; notranslate">
/*
 * Removing the first image from post
 */
function remove_first_image ($content) {
 if (!is_page() &amp;&amp; !is_feed() &amp;&amp; !is_feed() &amp;&amp; !is_home()) {
    if (preg_match(&quot;/&lt;img[^&gt;]+\&gt;/i&quot;,$content)) {
		 $content = preg_replace(&quot;/&lt;img[^&gt;]+\&gt;/i&quot;, &quot;&quot;, $content, 1);
 	}
	return $content;
   }
}
</pre>
<p>But I faced the some issues with that code. When first image has caption then only image get removed and caption will remain there.</p>
<p>After that I used the following code for caption remove.</p>
<pre class="brush: php; title: ; notranslate">
/*
 * Removing the first caption from post with image
 */
function remove_first_image_caption ($content) {
 if (!is_page() &amp;&amp; !is_feed() &amp;&amp; !is_feed() &amp;&amp; !is_home()) {
 $content = preg_replace(&quot;(\)&quot;, &quot;&quot;, $content, 1);
 } return $content;
}
add_filter('the_content', 'remove_first_image_caption');
</pre>
<p>But if first image has no caption and second image image has caption then both the images will be get removed from post.</p>
<p>After some struggle I written following code. Following is the solution:</p>
<p>Final Code.</p>
<pre class="brush: php; title: ; notranslate">
/*
 * Removing the first image from post
 * functionality added to delete caption is present to first image.
 */
function remove_first_image ($content) {
 if (!is_page() &amp;&amp; !is_feed() &amp;&amp; !is_feed() &amp;&amp; !is_home()) {
    if (preg_match(&quot;/&lt;img[^&gt;]+\&gt;/i&quot;,$content)) {
    //find first image URL
     $first_img = '';
     $output = preg_match_all('/&lt; *img[^&gt;]*src *= *[&quot;\']?([^&quot;\']*)/', $content, $matches);
     $first_img = $matches[1][0];

    //find first image caption inner text
     $output = preg_match_all(&quot;/caption=['&quot;](.*)/&quot;, $content, $matches);

     //find first image present in first caption text or not
        $pos = strpos($matches[0][0], $first_img);

    // if image URL found in caption array then delete the caption and image
        if ($pos !== false) {
           $content = preg_replace(&quot;(\)&quot;, &quot;&quot;, $content, 1);
        } else {
           $content = preg_replace(&quot;/&lt;img[^&gt;]+\&gt;/i&quot;, &quot;&quot;, $content, 1);
        }
    }

 } return $content;
}
add_filter('the_content', 'remove_first_image');
</pre>
<p>solved: pagination for Custom post type not working</p>
<p>Some people asked me about pagination of custom post type. That is very easy.</p>
<p>For showing the custom post type we always use the query_post method.</p>
<p>Just use the following code in your template or theme file.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php get_header(); ?&gt;

            &lt;?php  query_posts( 'post_type=custom-post-type&amp;paged='.$paged );
                                    if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

loop here

              			&lt;?php endwhile; ?&gt;
				  &lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&gt;
					&lt;div class=&quot;nav-previous&quot;&gt;&lt;?php next_posts_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older posts', 'twentyten' ) ); ?&gt;&lt;/div&gt;
					&lt;div class=&quot;nav-next&quot;&gt;&lt;?php previous_posts_link( __( 'Newer posts &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
				  &lt;/div&gt;&lt;!-- #nav-below --&gt;
				  &lt;?php endif; wp_reset_query(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
[caption id="attachment_6934" align="alignnone" width="300" caption="How to remove first image from wordpress post with caption if caption is present"]<a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/wordpress-caption-image/" rel="attachment wp-att-6934"><img class="size-medium wp-image-6934" title="How to remove first image from wordpress post with caption if caption is present" src="http://images.wordpressapi.com/wordpress-caption-image-300x300.jpg" alt="How to remove first image from wordpress post with caption if caption is present" width="300" height="300" /></a>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="wordpress remove first">wordpress remove first</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="wordpress preg_replace remove caption">wordpress preg_replace remove caption</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="wordpress preg_match image">wordpress preg_match image</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="wordpress delete first image from post">wordpress delete first image from post</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="strip caption tag from wordpress content using mysql">strip caption tag from wordpress content using mysql</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="strip caption from wordpress">strip caption from wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="remove captions by add_filter">remove captions by add_filter</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="remove caption php">remove caption php</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="remove a href from the_content wordpress">remove a href from the_content wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="preg_replace  &gt;/i $content $images);">preg_match_all(/&lt;img[^&gt;] &gt;/i $content $images);</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="preg_match wordpress post content">preg_match wordpress post content</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="is_home directive">is_home directive</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="how to remove the 1st image in a post in a category in wordpress">how to remove the 1st image in a post in a category in wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="function remove_first_image ($content) { if (!is_page() &amp;&amp; !is_feed() &amp;&amp; !is_feed() &amp;&amp; !is_home()) { $content = preg_replace(/&lt;img[^&gt;] \&gt;/i $content 1); } return $content; } add_filter(\the_content\ \remove_first_image\);">function remove_first_image ($content) { if (!is_page() &amp;&amp; !is_feed() &amp;&amp; !is_feed() &amp;&amp; !is_home()) { $content = preg_replace(/&lt;img[^&gt;] \&gt;/i $content 1); } return $content; } add_filter(\the_content\ \remove_first_image\);</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="exclude caption id from html post wordpress">exclude caption id from html post wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="caption remove from content in wordpress">caption remove from content in wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/" title="amazon api preg_match">amazon api preg_match</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/11/16/how-to-remove-first-image-from-wordpress-post-with-caption-if-caption-is-present/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>wordpress pagination with query_posts</title>
		<link>http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/</link>
		<comments>http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 15:44:14 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6925</guid>
		<description><![CDATA[http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/Mostly people use the query_posts function for fetching the specific posts. But most of all people face issue with pagination. Just use following code for pagination. It is simple and easy. Incoming search terms:wordpress 3 3 query_postsquery_posts paginationsimple php codes &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/<p>Mostly people use the query_posts function for fetching the specific posts. But most of all people face issue with pagination.</p>
<p>Just use following code for pagination. It is simple and easy.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts( 'post_type=documents&amp;paged='.$paged );
query_posts( 'post_type=post&amp;paged='.$paged );
if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
&lt;?php the_excerpt();  ?&gt;

 &lt;?php endwhile; ?&gt;
&lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&gt;
                                        &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php next_posts_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older posts', 'twentyten' ) ); ?&gt;&lt;/div&gt;
                                        &lt;div class=&quot;nav-next&quot;&gt;&lt;?php previous_posts_link( __( 'Newer posts &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
                                &lt;/div&gt;&lt;!-- #nav-below --&gt;
                                  &lt;?php endif; wp_reset_query(); ?&gt;
</pre>
<div id="attachment_6926" class="wp-caption alignnone<a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/wordpress-pag/" rel="attachment wp-att-6926"><img class="size-full wp-image-6926" title="wordpress pagination with query_posts" src="http://images.wordpressapi.com/wordpress-pag.jpg" alt="wordpress pagination with query_posts" width="550" height="200" /></a><p class="wp-caption-text">wordpress pagination with query_posts</p></div>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress 3 3 query_posts">wordpress 3 3 query_posts</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="query_posts pagination">query_posts pagination</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="simple php codes for pagination">simple php codes for pagination</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="query_posts pagination remove">query_posts pagination remove</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress older newer post paging plugin with ajax">wordpress older newer post paging plugin with ajax</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="custom pagination with get_posts in wordpress">custom pagination with get_posts in wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="twenty ten query_posts">twenty ten query_posts</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress 3 query post">wordpress 3 query post</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress query_posts ajax">wordpress query_posts ajax</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress query_posts home disable pagination">wordpress query_posts home disable pagination</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress seo plugin query_posts">wordpress seo plugin query_posts</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="wordpress wp_query post meta search">wordpress wp_query post meta search</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="query_posts() next post">query_posts() next post</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="query_posts пагинация">query_posts пагинация</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="get_posts qtranslate">get_posts qtranslate</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="pagination wordpress archive query_post">pagination wordpress archive query_post</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="previous and next with query posts wordpress">previous and next with query posts wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="qtranslate and query_posts">qtranslate and query_posts</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="qtranslate pagination broken">qtranslate pagination broken</a></li><li><a href="http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/" title="query_posts ajax pagination">query_posts ajax pagination</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/11/15/wordpress-pagination-with-query_posts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to show some posts to only registered users in wordpress</title>
		<link>http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/</link>
		<comments>http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 15:12:14 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>
		<category><![CDATA[private category]]></category>
		<category><![CDATA[wordpress api]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6921</guid>
		<description><![CDATA[http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/Some people want to show selected posts to only registered users in site. You can easily achieve this. You just need to create public and private category and publish your selected posts in private category. Use the following code in index.php &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/<p>Some people want to show selected posts to only registered users in site. You can easily achieve this. You just need to create public and private category and publish your selected posts in private category. Use the following code in index.php and single.php and page.php file.</p>
<pre class="brush: php; title: ; notranslate">

$cat_id = get_cat_ID('private');
$args=array(
  'category__not_in' =&gt; $cat_id,
  'post_type' =&gt; 'post',
  'post_status' =&gt; 'publish',
  'posts_per_page' =&gt; 5
);

if(!is_user_logged_in()){
    $cat_id = get_cat_ID('private');
   $args=array(
  'category__not_in' =&gt; $cat_id,
  'post_type' =&gt; 'post',
  'post_status' =&gt; 'publish',
  'posts_per_page' =&gt; 5
);

} else {
    $cat_id = get_cat_ID('public');
$args=array(
  'category__not_in' =&gt; $cat_id,
  'post_type' =&gt; 'post',
  'post_status' =&gt; 'publish',
  'posts_per_page' =&gt; 5
);

}
// The Query
query_posts( $args );

// The Loop
while ( have_posts() ) : the_post();
	echo '&lt;li&gt;';
	the_title();
	echo '&lt;/li&gt;';
endwhile;

// Reset Query
wp_reset_query();
</pre>
<div id="attachment_6922" class="wp-caption alignnone<a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/private-wordpress-posts/" rel="attachment wp-att-6922"><img class="size-full wp-image-6922" title="How to show some posts to only registered users in wordpress" src="http://images.wordpressapi.com/private-wordpress-posts.jpg" alt="How to show some posts to only registered users in wordpress" width="200" height="148" /></a><p class="wp-caption-text">How to show some posts to only registered users in wordpress</p></div>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="wordpress menu post_status == \register\">wordpress menu post_status == \register\</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="$args = array( \post_type\ =&gt; array(\post\ \post_type\) \cat_id\ =&gt; 24">$args = array( \post_type\ =&gt; array(\post\ \post_type\) \cat_id\ =&gt; 24</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="wordpress category__not_in=&gt; slug">wordpress category__not_in=&gt; slug</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="word press only show category to registered">word press only show category to registered</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="show only some posts rails">show only some posts rails</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="how to display posts in wordpress for registered user">how to display posts in wordpress for registered user</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="category__not_in working queery">category__not_in working queery</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="category__not_in wordpress query">category__not_in wordpress query</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="&lt;?php $args = array( post_type=&gt; array(print) posts_per_page =&gt; -1 ); query_posts( $args ); ?&gt;">&lt;?php $args = array( post_type=&gt; array(print) posts_per_page =&gt; -1 ); query_posts( $args ); ?&gt;</a></li><li><a href="http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/" title="wordpress mobile shows private category">wordpress mobile shows private category</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/11/10/how-to-show-some-posts-to-only-registered-users-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show the posts that were tagged with a some keywords</title>
		<link>http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/</link>
		<comments>http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 17:23:41 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress tutorials]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6917</guid>
		<description><![CDATA[http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/We can show the five posts with certain tags. We can use following code for showing the posts. Just use the following code. Incoming search terms:qtranslate html bugdisplay all archives keyword wordpressdisplay posts tagged with keyword wordpressforeach ($postslist as $post) &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/<p>We can show the five posts with certain tags. We can use following code for showing the posts.</p>
<p>Just use the following code.</p>
<pre class="brush: php; title: ; notranslate">
&lt;pre&gt;&lt;code&gt;&lt;?php &lt;/code&gt;
&lt;code&gt;$args = array( 'numberposts' =&gt; 5, 'order'=&gt; 'DESC', 'orderby' =&gt; 'post_date', 'tag_slug__in' =&gt; array( 'wordpress, tag1,tag2' ) ); &lt;/code&gt;
&lt;code&gt;$postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?&gt;&lt;/code&gt;
&lt;code&gt; &lt;?php the_time('F j, Y'); ?&gt; &lt;/code&gt;
&lt;code&gt;&lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt; &lt;/code&gt;
&lt;code&gt;&lt;?php the_title(); ?&gt;&lt;/code&gt;
&lt;code&gt; &lt;/a&gt; &lt;?php the_excerpt(); ?&gt;&lt;/code&gt;
&lt;code&gt; &lt;?php endforeach; ?&gt;&lt;/code&gt;
&lt;code&gt;</pre>
<p></code></pre>
<div id="attachment_6918" class="wp-caption alignnone<a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/facebook-like-wordpress-plugin1-305x143/" rel="attachment wp-att-6918"><img class="size-full wp-image-6918" title="Show the posts that were tagged with a some keywords" src="http://images.wordpressapi.com/facebook-like-wordpress-plugin1-305x143.jpg" alt="Show the posts that were tagged with a some keywords" width="305" height="143" /></a><p class="wp-caption-text">Show the posts that were tagged with a some keywords</p></div>
<pre><code>
</code></pre>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="qtranslate html bug">qtranslate html bug</a></li><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="display all archives keyword wordpress">display all archives keyword wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="display posts tagged with keyword wordpress">display posts tagged with keyword wordpress</a></li><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="foreach ($postslist as $post) pot title">foreach ($postslist as $post) pot title</a></li><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="how to display posts by keywords">how to display posts by keywords</a></li><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="wordpress add keyword for post api">wordpress add keyword for post api</a></li><li><a href="http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/" title="wp_mail embed images html mail">wp_mail embed images html mail</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/11/07/show-the-posts-that-were-tagged-with-a-some-keywords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: wordpressapi.com @ 2012-02-10 06:22:20 by W3 Total Cache -->
