<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: Adding a Filter with str_replace to functions.php</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: Adding a Filter with str_replace to functions.php</description>
<language>en</language>
<pubDate>Tue, 24 Nov 2009 08:19:58 +0000</pubDate>

<item>
<title>llamaman on "Adding a Filter with str_replace to functions.php"</title>
<link>http://wordpress.org/support/topic/275464#post-1088570</link>
<pubDate>Mon, 01 Jun 2009 10:54:02 +0000</pubDate>
<dc:creator>llamaman</dc:creator>
<guid isPermaLink="false">1088570@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hello!&#60;br /&#62;
I am a NOOB when it comes to writing functions for the functions.php file.  What I would like to do is to incorporate the &#34;More to the Top&#34; plugin into a theme via the functions.php file. &#60;/p&#62;
&#60;p&#62;Here is my code that is not working in my functions.php file:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter( &#38;#39;the_content&#38;#39;, &#38;#39;moretothetop&#38;#39; );

function moretothetop( $content ) {
	global $post;

	return str_replace( array( &#38;#39;#more-&#38;#39; . $post-&#38;gt;ID . &#38;#39;&#38;quot;&#38;#39;, &#38;#39;&#38;lt;span id=&#38;quot;more-&#38;#39; . $post-&#38;gt;ID . &#38;#39;&#38;quot;&#38;gt;&#38;lt;/span&#38;gt;&#38;#39; ), array( &#38;#39;&#38;quot;&#38;#39;, &#38;#39;&#38;#39; ), $content);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Can you help me figure this out?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
