<?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>WpFunc &#187; function</title>
	<atom:link href="http://wpfunc.com/tag/function/feed" rel="self" type="application/rss+xml" />
	<link>http://wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Thu, 01 Dec 2011 01:17:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Show link with page names</title>
		<link>http://wpfunc.com/wordpress/show-link-with-page-names.html</link>
		<comments>http://wpfunc.com/wordpress/show-link-with-page-names.html#comments</comments>
		<pubDate>Thu, 10 Nov 2011 00:59:13 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[linkname]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=504</guid>
		<description><![CDATA[You can show links with Pages names. That means target pages name. Let&#8217;s begin&#8230;
The code
Add this code into functions.php which file in your theme&#8217;s. After that you can use this shortcode with your posts.
The Sample is here (Turkish) Click
Simple isn&#8217;t it :)
]]></description>
			<content:encoded><![CDATA[<p>You can show links with Pages names. That means target pages name. Let&#8217;s begin&#8230;<span id="more-504"></span></p>
<h3>The code</h3>
<pre class="brush: php; title: ; notranslate">//Show link with name
function link_ismi_getir($atts) { //Fonksiyon başlangıcı :)
	extract(shortcode_atts(array(
          'url' =&gt; '', //url=&quot;adress(with http://)&quot;
     ), $atts));
	 $str = file_get_contents($url);
    if(strlen($str)&gt;0){ //if $str is bigger than &quot;0&quot;
        preg_match(&quot;/\&lt;title \&gt;(.*)\&lt; \/title\&gt;/&quot;,$str,$title); //Target page's header.
	$linkaname = '&lt;a href=&quot;'.$url.'&quot; target=&quot;_blank&quot; title=&quot;'.$title[1].'&quot;&gt;'.$title[1].'&lt;/a&gt;'; //Link
        return $linkaname; //Get link with $linkaname
		}
}
add_shortcode('linkname', 'link_ismi_getir');
//Shortcode maker :)</pre>
<p>Add this code into functions.php which file in your theme&#8217;s. After that you can use this shortcode with your posts.</p>
<pre class="brush: php; title: ; notranslate">[linkname url=&quot;http://yourtargeturl.com&quot;]</pre>
<p>The Sample is here (Turkish) <a href="http://www.kaisercrazy.com/cms-sistemleri/wordpress/linklerin-isimleriyle-gostermek.html" target="_blank">Click</a></p>
<p>Simple isn&#8217;t it :)</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/show-link-with-page-names.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Share, Like, Send and other social buttons&#8230;</title>
		<link>http://wpfunc.com/wordpress/share-like-send-and-other-social-buttons.html</link>
		<comments>http://wpfunc.com/wordpress/share-like-send-and-other-social-buttons.html#comments</comments>
		<pubDate>Fri, 20 May 2011 21:27:55 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[send]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=479</guid>
		<description><![CDATA[You can add social buttons with this litte function. Let&#8217;s begin&#8230;
Here is the code;
Add this code in your theme&#8217;s functions.php 
You have to change  areas for your theme &#38; site. Download this javascript files and upload into your theme.

Sample Image

]]></description>
			<content:encoded><![CDATA[<p>You can add social buttons with this litte function. Let&#8217;s begin&#8230;<span id="more-479"></span></p>
<h3>Here is the code;</h3>
<p>Add this code in your theme&#8217;s <strong>functions.php</strong> </p>
<pre class="brush: php; title: ; notranslate">//Like &amp; Share &amp; Send etc.
//Add After the_content
add_filter('the_content', cagirbeni);
function cagirbeni($content) {
$sayfalink = get_permalink();

//Importanat Area
$fappId = &quot;126927697318171&quot;; //Your Facebook AppID or same with this.
$twittervia = &quot;kaisercrazy&quot;; //Write your twitter username.
$temaklasoru =&quot;kaisercrazy/javascripts&quot;; //Path of your javascript files in your theme.
//Importanat Area

	if(is_single()) {
	$content .= $button = '&lt;div style=&quot;height:21px;margin-bottom:10px;&quot;&gt;&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;&lt;script src=&quot;http://connect.facebook.net/en_US/all.js#appId='.$fappId.'&amp;amp;xfbml=1&quot;&gt;&lt;/script&gt;&lt;fb:like href=&quot;'.$sayfalink.'&quot; send=&quot;true&quot; width=&quot;170&quot; show_faces=&quot;false&quot; layout=&quot;button_count&quot; font=&quot;segoe ui&quot;&gt;&lt;/fb:like&gt;&lt;div style=&quot;float:right;height:20px;margin-bottom:15px;&quot;&gt;&lt;a href=&quot;http://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-count=&quot;horizontal&quot; data-via=&quot;'.$twittervia.'&quot;&gt;Tweet&lt;/a&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;/wp-content/themes/'.$temaklasoru.'/twitter.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; src =&quot;/wp-content/themes/'.$temaklasoru.'/buttons.js&quot;&gt;&lt;/script&gt;&lt;a class=&quot;DiggThisButton DiggCompact&quot; rev=&quot;news, technology&quot;&gt;&lt;/a&gt;&lt;div id=&quot;fb_share_1&quot; style=&quot;float:right;margin-left: 10px;&quot;&gt;&lt;a name=&quot;fb_share&quot; type=&quot;button_count&quot; share_url=&quot;'.$sayfalink.'&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Paylaş&lt;/a&gt; &lt;/div&gt;&lt;script src=&quot;/wp-content/themes/'.$temaklasoru.'/FB.Share.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;/div&gt;&lt;/div&gt;';
}
	return $content ;
}
//Like &amp; Share &amp; Send etc.</pre>
<p>You have to change  areas for your theme &amp; site. Download this javascript files and upload into your theme.<br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
</p>
<h3>Sample Image</h3>
<p><a class="highslide img_2" href="http://www.wpfunc.com/wp-content/uploads/2011/05/social-area.png" onclick="return hs.expand(this)"><img src="http://www.wpfunc.com/wp-content/uploads/2011/05/social-area.png" alt="" title="social-area" width="655" height="32" class="alignnone size-full wp-image-480" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/share-like-send-and-other-social-buttons.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Meta Description</title>
		<link>http://wpfunc.com/wordpress/dynamic-meta-description.html</link>
		<comments>http://wpfunc.com/wordpress/dynamic-meta-description.html#comments</comments>
		<pubDate>Fri, 17 Dec 2010 09:04:46 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[header.php]]></category>
		<category><![CDATA[meta description]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=465</guid>
		<description><![CDATA[WordPress using blog description with meta description. But we want to sync. with search terms and posts. We can do that without a plugin. Let&#8217;s begin.
We can make this via functions.php. If we make a function about this we can use posts excerpt with meta tag description.
Here is the code;
Make a copy of your theme&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress using blog description with meta description. But we want to sync. with search terms and posts. We can do that without a plugin. Let&#8217;s begin.</p>
<p><span id="more-465"></span>We can make this via functions.php. If we make a function about this we can use posts excerpt with meta tag description.</p>
<h3>Here is the code;</h3>
<p>Make a copy of your <strong><span style="color: #0000ff;">theme&#8217;s</span></strong> <span style="color: #ff0000;"><strong>functions.php</strong></span> and add this code before <strong><span style="color: #ff0000;">?&gt;</span></strong></p>
<pre class="brush: php; title: ; notranslate">
function dynamic_meta_description() {
	$rawcontent = 	get_the_content();
	if(empty($rawcontent)) {
		$rawcontent = htmlentities(bloginfo('description'));
	} else {
		$rawcontent = apply_filters('the_content_rss', strip_tags($rawcontent));
		$rawcontent = preg_replace('/\[.+\]/','', $rawcontent);
		$chars = array(&quot;&quot;, &quot;\n&quot;, &quot;\r&quot;, &quot;chr(13)&quot;,  &quot;\t&quot;, &quot;&#92;&#48;&quot;, &quot;\x0B&quot;);
		$rawcontent = htmlentities(str_replace($chars, &quot; &quot;, $rawcontent));
	}
	if (strlen($rawcontent) &lt; 155) {
		echo $rawcontent;
	} else {
		$desc = substr($rawcontent,0,155);
		return $desc;
	}
}
</pre>
<p>Save functions.php and place it to your theme&#8217;s folder. In this code we use <strong><span style="color: #ff0000;">get_the_contet()</span></strong> function for call our post.<br />
After that you can use this code into your header.php for meta descripton.</p>
<pre class="brush: php; title: ; notranslate">&lt;meta name=&quot;description&quot; content=&quot;&lt;?php echo dynamic_meta_description(); ?&gt;&quot; /&gt;</pre>
<p>That&#8217;s All.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/dynamic-meta-description.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Send e-mail to users about your new post!</title>
		<link>http://wpfunc.com/wordpress/send-e-mail-to-users-about-your-new-post.html</link>
		<comments>http://wpfunc.com/wordpress/send-e-mail-to-users-about-your-new-post.html#comments</comments>
		<pubDate>Tue, 26 Oct 2010 15:18:47 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[send email]]></category>
		<category><![CDATA[subscribe]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=460</guid>
		<description><![CDATA[There is no need subscribe plugins. You can send e-mails to your users. When you write a new article WordPress automatically send a new mail to your users. This is a simple trick on functions.php.
Here is the code;
Open your theme&#8217;s functions.php and add this code before the last ?&#62;
Save functions.php and send it to server. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There is no need subscribe plugins. You can send e-mails to your users. When you write a new article WordPress automatically send a new mail to your users. This is a simple trick on functions.php.<span id="more-460"></span></p>
<p style="text-align: justify;">Here is the code;</p>
<p style="text-align: justify;">Open <strong>your theme&#8217;s <span style="color: #ff0000;">functions.php</span></strong> and add this code before the last <span style="color: #ff0000;"><strong>?&gt;</strong></span></p>
<pre class="brush: php; title: ; notranslate">function email_members($post_ID)  {
    global $wpdb;
    $usersarray = $wpdb-&gt;get_results(&quot;SELECT user_email FROM $wpdb-&gt;users;&quot;);
    $users = implode(&quot;,&quot;, $usersarray);
    mail($users, &quot;There is a new postı!&quot;, 'There is anew post on http://www.yoursiteurl.com!');
    return $post_ID;
}

add_action('publish_post', 'email_members');
</pre>
<p style="text-align: justify;">Save functions.php and send it to server. That&#8217;s All!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/send-e-mail-to-users-about-your-new-post.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;</title>
		<link>http://wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html</link>
		<comments>http://wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html#comments</comments>
		<pubDate>Fri, 11 Jun 2010 10:06:06 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[have_posts]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[index.php]]></category>
		<category><![CDATA[question]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Udegbunam]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=440</guid>
		<description><![CDATA[Hi again. I know i can&#8217;t write near 20 days. But Udegbunam asked me a question on this post. I try some code on this problem and i found a solution for this. You know, i write an article about using  Two or more single php. I used some if and else option for change [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Hi again. I know i can&#8217;t write near 20 days. But <a href="http://www.wpfunc.com/wordpress/show-default-theme-for-ie6-visitors.html#comment-56" target="_blank">Udegbunam asked me a question on this post</a>. I try some code on this problem and i found a solution for this. You know, i write an article about using  <a href="http://www.wpfunc.com/wordpress/use-two-or-more-single-php.html" target="_blank">Two or more single php</a>. <span id="more-440"></span>I used some if and else option for change single.php for each category. With this code we can change our index.php for IE6 users. Nearly simple code and we can use this with different browsers (IE7, Safari etc.).  Lets begin!</p>
<p style="text-align: justify;"><span class="alert">Before start make a backup of your theme&#8217;s index.php. I used default theme&#8217;s files for this. Your template can have different files or codes.</span></p>
<p style="text-align: justify;">Firstly we have to copy our real index.php twice. After that rename them with <span style="color: #ff0000;"><strong>index-ie6.php</strong></span> and <span style="color: #ff0000;"><strong>index-real.php</strong></span>. Clear <strong><span style="color: #ff0000;">index.php</span></strong>&#8216;s code and place that code below;</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) {
include(TEMPLATEPATH . '/index-ie6.php'); }
else { include(TEMPLATEPATH . '/index-real.php');
}
?&gt;</pre>
<p style="text-align: justify;">After that we change index-ie6.php for IE6 users. I simply change <span style="color: #ff0000;"><strong>have_post</strong></span><span style="color: #ff0000;">s</span> function with a <span style="color: #ff0000;"><strong>h3</strong></span> :). Here is the <span style="color: #ff0000;"><strong>index-ie6.php</strong></span>;</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header(); ?&gt;

	&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&gt;
&lt;div&gt;&lt;h3&gt;Sorry You're using Internet Explorer 6 &lt;/h3&gt;&lt;/div&gt;

	&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>Don&#8217;t change index-real.php&#8217;s codes. This is the real index.php of your theme.</strong></span><br />
That&#8217;s All. There is no more code :) If you want i take some screenshots for this. IE6, IE8 and Firefox.</p>

<a href='http://wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html/attachment/firefox' title='Firefox Works Regularly'><img width="150" height="150" src="http://www.wpfunc.com/wp-content/uploads/2010/06/firefox-150x150.png" class="attachment-thumbnail" alt="Firefox Works Regularly" title="Firefox Works Regularly" /></a>
<a href='http://wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html/attachment/ie6' title='IE 6 shows what we write'><img width="150" height="150" src="http://www.wpfunc.com/wp-content/uploads/2010/06/ie6-150x150.png" class="attachment-thumbnail" alt="IE 6 shows what we write" title="IE 6 shows what we write" /></a>
<a href='http://wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html/attachment/ie8' title='IE8 Works Regularly'><img width="150" height="150" src="http://www.wpfunc.com/wp-content/uploads/2010/06/ie8-150x150.png" class="attachment-thumbnail" alt="IE8 Works Regularly" title="IE8 Works Regularly" /></a>

]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Your Titles Shorten Then Now!</title>
		<link>http://wpfunc.com/wordpress/make-your-titles-shorten-then-now.html</link>
		<comments>http://wpfunc.com/wordpress/make-your-titles-shorten-then-now.html#comments</comments>
		<pubDate>Fri, 16 Apr 2010 19:13:46 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[index.php]]></category>
		<category><![CDATA[long titles]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[short title]]></category>
		<category><![CDATA[title]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=422</guid>
		<description><![CDATA[Some people use extremly long titles for their blog. Also you can use titles like that. There is a way to make short titles for SEO. I will give to you this quick and simple function to make this. Let&#8217;s begin&#8230;
Here is The Code;
Add this function into your theme&#8217;s functions.php.
After this you can use this [...]]]></description>
			<content:encoded><![CDATA[<p>Some people use extremly long titles for their blog. Also you can use titles like that. There is a way to make short titles for SEO. I will give to you this quick and simple function to make this. Let&#8217;s begin&#8230;<span id="more-422"></span></p>
<h3>Here is The Code;</h3>
<p>Add this function into your<span style="color: #ff0000;"><strong> theme&#8217;s</strong></span> <span style="color: #ff0000;"><strong>functions.php</strong></span>.</p>
<pre class="brush: php; title: ; notranslate">function short_title($after = '', $length) {
	$mytitle = explode(' ', get_the_title(), $length);
	if (count($mytitle)&gt;=$length) {
		array_pop($mytitle);
		$mytitle = implode(&quot; &quot;,$mytitle). $after;
	} else {
		$mytitle = implode(&quot; &quot;,$mytitle);
	}
	return $mytitle;
}</pre>
<p>After this you can use this simple function for show your titles shorten then now. You can add this lines into your <span style="color: #ff0000;"><strong>index.php</strong></span> or where you want!</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
// short_title($after, $length)
echo short_title('...', 10);
?&gt;</pre>
<p>That&#8217;s all. Have a nice day.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/make-your-titles-shorten-then-now.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Catch the First Image</title>
		<link>http://wpfunc.com/wordpress/catch-the-first-image.html</link>
		<comments>http://wpfunc.com/wordpress/catch-the-first-image.html#comments</comments>
		<pubDate>Fri, 12 Mar 2010 20:50:10 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[first image]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[get image]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[thumbnail]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=410</guid>
		<description><![CDATA[You can catch the your posts first image and use them for thumbnails. Also you can use default images for this. With this function you can use any image (first image on your posts also) for thumbnail. Lets Begin&#8230;
Here is the code;
This is the output;
This is the usage;
Usage with the img tag;
Usage on site;
And CSS;
That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You can catch the your posts first image and use them for thumbnails. Also you can use default images for this. With this function you can use any image (first image on your posts also) for thumbnail. Lets Begin&#8230;<span id="more-410"></span></p>
<h3>Here is the code;</h3>
<pre class="brush: php; title: ; notranslate">function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/&lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&gt;/i', $post-&gt;post_content, $matches);
$first_img = $matches [1] [0];
if(empty($first_img)){ //Varsayılan küçük resim
$first_img = &quot;wp-content/themes/tema adı/images/default.png&quot;;
}
return $first_img;
}</pre>
<h3>This is the output;</h3>
<pre class="brush: php; title: ; notranslate">catch_that_image()</pre>
<h3>This is the usage;</h3>
<p>Usage with the img tag;</p>
<pre class="brush: php; title: ; notranslate">&lt;img src=&quot;&lt;?php echo catch_that_image() ?&gt;&quot; alt=&quot;&quot;/&gt;</pre>
<p>Usage on site;</p>
<pre class="brush: php; title: ; notranslate">&lt;span class=&quot;custom_image&quot;&gt;
&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Read: &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo catch_that_image() ?&gt;&quot; alt=&quot;&quot;/&gt; &lt;/a&gt;
&lt;/span&gt;</pre>
<h3>And CSS;</h3>
<pre class="brush: css; title: ; notranslate">.custom_image img{float:left; padding:3px; margin:7px 10px 15px 0; border: 2px solid #e6e6e6; height:90px; width:90px}</pre>
<p>That&#8217;s All!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/catch-the-first-image.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Create PDF Button</title>
		<link>http://wpfunc.com/wordpress/create-pdf-button.html</link>
		<comments>http://wpfunc.com/wordpress/create-pdf-button.html#comments</comments>
		<pubDate>Tue, 02 Mar 2010 18:00:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[google docs]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[shortcode]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=408</guid>
		<description><![CDATA[This is a simple button for display PDF&#8217;s with Google Docs. You can easily apply this code into your theme&#8217;s functions.php. And this useful thing has 4 lines code. Let&#8217;s Begin&#8230;
Here is the code;
Add this line into your theme&#8217;s functions.php;
That&#8217;s All. Now use your shortcode;
This tip orginally posted in WpRecipes.
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This is a simple button for display PDF&#8217;s with Google Docs. You can easily apply this code into your theme&#8217;s <strong>functions.php</strong>. And this useful thing has 4 lines code. Let&#8217;s Begin&#8230;<span id="more-408"></span></p>
<h3>Here is the code;</h3>
<p>Add this line into your theme&#8217;s <strong><span style="color: #ff0000;">functions.php</span></strong>;</p>
<pre class="brush: php; title: ; notranslate">function pdflink($attr, $content) {
	return '&lt;a class=&quot;pdf&quot; href=&quot;http://docs.google.com/viewer?url=' . $attr['href'] . '&quot;&gt;'.$content.'&lt;/a&gt;';
}
add_shortcode('pdf', 'pdflink');
</pre>
<p>That&#8217;s All. Now use your shortcode;</p>
<pre class="brush: php; title: ; notranslate">[pdf href=&quot;http://yoursite.com/linktoyour/file.pdf&quot;]View PDF[/pdf]</pre>
<p>This tip orginally posted in <a href="http://www.wprecipes.com/wordpress-tip-create-a-pdf-viewer-shortcode">WpRecipes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/create-pdf-button.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice Search Plugin!</title>
		<link>http://wpfunc.com/wp-plugins/nice-search-plugin.html</link>
		<comments>http://wpfunc.com/wp-plugins/nice-search-plugin.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:39:06 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[WP Plugins]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[searched text]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress search]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=360</guid>
		<description><![CDATA[This plugin is a very simple redirect plugin. The Plugin change WordPress&#8217; search context &#8220;?s=searched%20word&#8221; to permalink &#8220;/search/searched+word/&#8221; one. Also change &#8220;%20&#8243; to &#8220;+&#8221;. Thanks to Mark Jaquith!
Here is the Plugin;
You can see what code the plugin has;
That&#8217;s All!
You can download it from here:
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This plugin is a very simple redirect plugin. The Plugin change WordPress&#8217; search context &#8220;?s=searched%20word&#8221; to permalink &#8220;/search/searched+word/&#8221; one. Also change &#8220;%20&#8243; to &#8220;+&#8221;. Thanks to Mark Jaquith!<span id="more-360"></span></p>
<h3>Here is the Plugin;</h3>
<p>You can see what code the plugin has;</p>
<pre class="brush: php; title: ; notranslate">&lt;?php /*
Plugin Name: Nice Search
Version: 0.2
Plugin URI: http://txfx.net/code/wordpress/nice-search/
Description: Redirects ?s=query searches to /search/query, and converts %20 to +
Author: Mark Jaquith
Author URI: http://txfx.net/
*/

function txfx_nice_search() {
	if ( is_search() &amp;&amp; strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false &amp;&amp; strpos($_SERVER['REQUEST_URI'], '/search/') === false ) {
		wp_redirect(get_bloginfo('home') . '/search/' . str_replace(' ', '+', str_replace('%20', '+', get_query_var('s'))));
		exit();
	}
}

add_action('template_redirect', 'txfx_nice_search');
?&gt;
</pre>
<p>That&#8217;s All!<br />
You can download it from here:<br />
Note: There is a file embedded within this post, please visit this post to download the file.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wp-plugins/nice-search-plugin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Custom Content to Search Engine Visitors!</title>
		<link>http://wpfunc.com/wordpress/display-custom-content-to-search-engine-visitors.html</link>
		<comments>http://wpfunc.com/wordpress/display-custom-content-to-search-engine-visitors.html#comments</comments>
		<pubDate>Mon, 28 Dec 2009 10:24:51 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[del.icio.us]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[visitors]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=337</guid>
		<description><![CDATA[With this code you can show a custom message or contet to your search-engine visitors. We will edit funcitons.php and any theme file you want to show your content to search engine vsitors. Let&#8217;s Begin&#8230;
Here is the code;
Backup and open your theme&#8217;s functions.php and insert this code into it.
You can edit or add any search [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">With this code you can show a custom message or contet to your search-engine visitors. We will edit <span style="color: #ff0000;"><strong>funcitons.php </strong></span>and any theme file you want to show your content to search engine vsitors. Let&#8217;s Begin&#8230;<span id="more-337"></span></p>
<h3>Here is the code;</h3>
<p style="text-align: justify;"><strong><span style="color: #ff9900;">Backup</span></strong> and open your theme&#8217;s <span style="color: #ff0000;"><strong>functions.php</strong></span> and insert this code into it.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php function search_engine_visitors() {

	$ref = $_SERVER['HTTP_REFERER'];
	$SE  = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');

	foreach($SE as $source) {
		if(strpos($ref, $source) !== false) return true;
	}
	return false;
} ?&gt;</pre>
<p style="text-align: justify;">You can edit or add any search engine rules into $SE. After that your function is ready. Insert this code below where you want to show your custom content to visitors.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php if(function_exists('search_engine_visitors')) {
	if (search_engine_visitors()) {

		// INSERT YOUR CODE HERE

	}
} ?&gt;</pre>
<p style="text-align: justify;">That&#8217;s All. Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/display-custom-content-to-search-engine-visitors.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

