<?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>ZX:rishistar programming blocks &#187; Wordpress</title>
	<atom:link href="http://rishistar.com/zx/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://rishistar.com/zx</link>
	<description>Java/Wordpress programming tips and tricks</description>
	<lastBuildDate>Thu, 15 Jul 2010 15:58:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Including Custom Search Results In A WordPress Page</title>
		<link>http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/</link>
		<comments>http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 15:58:56 +0000</pubDate>
		<dc:creator>rishi</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[search facility]]></category>

		<guid isPermaLink="false">http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/</guid>
		<description><![CDATA[One website required certain pages to contain custom search results. To do this I needed to have the following code. The main tricks here are to create a second query as well as the main page query using the WP_Query method, and that the parameter for such a query needs an s=&#8230; to let it [...]]]></description>
			<content:encoded><![CDATA[<p>One website required certain pages to contain custom search results. </p>
<p>To do this I needed to have the following code. The main tricks here are to create a second query as well as the main page query using the WP_Query method, and that the parameter for such a query needs an s=&#8230; to let it know the phrase being supplied is a search term.</p>
<p>The get_post_meta() method allows extraction from the main page extra parameter list.</p>
<p><font color="#800040">&lt;?php     <br /></font><font color="#800040">     <br />$query_string = get_post_meta($post-&gt;ID, &#8216;organism_class&#8217;, true) ;       <br /></font><font color="#800040">$search = new WP_Query( &quot;s=$query_string&amp;showposts=5&quot; ) ;     <br />$search_posts = $search-&gt;query( &quot;s=$query_string&amp;showposts=5&quot; ) ; </font></p>
<p><font color="#800040"> while ($search-&gt;have_posts()) : $search-&gt;the_post();     <br />?&gt; </font></p>
<p><font color="#800040">&lt;h4&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h4&gt;     <br />&lt;?php the_content(); ?&gt;      <br /></font></p>
<p><font color="#800040">&lt;?php endwhile; ?&gt;</font></p>
]]></content:encoded>
			<wfw:commentRss>http://rishistar.com/zx/2010/07/including-custom-search-results-in-a-wordpress-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making your page Meta Tag the post title in WordPress</title>
		<link>http://rishistar.com/zx/2010/05/making-your-page-meta-tag-the-post-title-in-wordpress/</link>
		<comments>http://rishistar.com/zx/2010/05/making-your-page-meta-tag-the-post-title-in-wordpress/#comments</comments>
		<pubDate>Wed, 26 May 2010 15:17:30 +0000</pubDate>
		<dc:creator>rishi</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[meta tags]]></category>

		<guid isPermaLink="false">http://rishistar.com/zx/2010/05/making-your-page-meta-tag-the-post-title-in-wordpress/</guid>
		<description><![CDATA[The META tag can be used to provide additional information to search engines. Google doesn’t use meta tags directly to increase page rank but a helpful description can be useful in deciding what gets used as a page summary on another site, making something thats more appealing to the user than whatever bit of the [...]]]></description>
			<content:encoded><![CDATA[<p>The META tag can be used to provide additional information to search engines. Google doesn’t use meta tags directly to increase page rank but a helpful description can be useful in deciding what gets used as a page summary on another site, making something thats more appealing to the user than whatever bit of the page is displayed along with a link.</p>
<p>You can include this in WordPress using the following in the header.php file in your template.</p>
<p><strong>&lt;meta name=&quot;description&quot; content=&quot;&lt;?php the_title() ; ?&gt; &quot; /&gt;</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://rishistar.com/zx/2010/05/making-your-page-meta-tag-the-post-title-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress on the frontpage &#8211; displays category content, but not title</title>
		<link>http://rishistar.com/zx/2010/03/wordpress-on-the-frontpage-displays-category-content-but-not-title/</link>
		<comments>http://rishistar.com/zx/2010/03/wordpress-on-the-frontpage-displays-category-content-but-not-title/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 14:03:36 +0000</pubDate>
		<dc:creator>rishi</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://rishistar.com/zx/?p=101</guid>
		<description><![CDATA[So here&#8217;s an interesting one. Often I have sites with a page where there is a subcategory with a few of the latest entries fully featured on the front page. The following code, when I tried it, did not display the title for the subcategory entries. Instead of the subcategory post title I got the [...]]]></description>
			<content:encoded><![CDATA[<p>So here&#8217;s an interesting one. Often I have sites with a page where there is a subcategory with a few of the latest entries fully featured on the front page. The following code, when I tried it, did not display the title for the subcategory entries. Instead of the subcategory post title I got the main page title.</p>
<pre>&lt;?php
 $newsposts = get_posts('numberposts=2&amp;category=4');
 foreach($newsposts as $newspost_single) :
 setup_postdata($newspost_single);
?&gt;
 &lt;div&gt;
 &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
 &lt;?php the_content(); ?&gt;
 &lt;hr&gt;

 &lt;/div&gt;
&lt;?php endforeach; ?&gt;
</pre>
<p>The fix? To change the $newspost_single variable to $post. Not sure why this is the fix, and I should see if it counts as a bug, but it worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://rishistar.com/zx/2010/03/wordpress-on-the-frontpage-displays-category-content-but-not-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cyrillic Letters Turning Into Question Marks in WordPress</title>
		<link>http://rishistar.com/zx/2009/06/cyrillic-letters-turning-into-question-marks-in-wordpress/</link>
		<comments>http://rishistar.com/zx/2009/06/cyrillic-letters-turning-into-question-marks-in-wordpress/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 15:43:44 +0000</pubDate>
		<dc:creator>rishi</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cyrillic letters]]></category>
		<category><![CDATA[fantastico]]></category>

		<guid isPermaLink="false">http://rishistar.com/zx/?p=6</guid>
		<description><![CDATA[The Problem One client had the requirement of having an English language blog, but with a few words of Russian thrown in for good measure. However, as soon as she tried to save any of her posts, any characters in the Cyrillic script (i.e. the strange Russian ones) were converted into question marks. What was [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Problem</strong></p>
<p>One client had the requirement of having an English language blog, but with a few words of Russian thrown in for good measure. However, as soon as she tried to save any of her posts, any characters in the Cyrillic script (i.e. the strange Russian ones) were converted into question marks. What was the cause of this? Hunting and scouring initially produced no useful results &#8211; all the documentation pointed to WordPress being able to handle such letters and searches based on WordPress and Russian as keywords just produced localisation projects converting the whole WordPress interface into Russian. Or it was stuff in Russian that I didn&#8217;t understand. Eventually I stumbled upon a discussion on the WordPress forums that explained it all &#8211; <a href="http://wordpress.org/support/topic/183358?replies=30">the issue was in the database</a>.</p>
<p><strong>The Solution</strong></p>
<p>The issue was that Fantastico scripts used to create the database structure (as opposed to using the wordpress standard install scripts) gave databases in format latin1_swedish_ci (the later gives utf8_general_ci). As the blog hadn&#8217;t been used I just recreated it with the standard install and it was fine. A fix requiring preservation of existing data might be to back up the database (Tools-&gt;Export) in the admin interface, delete and recreate WordPress with the correct tables and then see what happens!</p>
<p><strong>Just goes to show that the famous WordPress 5-minute install script is the way to go (even if the file upload take more time)!</strong></p>
<p><a href="http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.co.uk%2Fs%3Fie%3DUTF8%26x%3D0%26ref%255F%3Dnb%255Fss%255Fw%255Fh%255F%26y%3D0%26field-keywords%3Dwordpress%26url%3Dsearch-alias%253Daps&#038;tag=rishistar-21&#038;linkCode=ur2&#038;camp=1634&#038;creative=19450">Want to learn more about WordPress? Browse WordPress Books!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rishistar.com/zx/2009/06/cyrillic-letters-turning-into-question-marks-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
