<?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>ThemeShaper Forums Topic: insert custom content after each post</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Tue, 21 May 2013 02:28:34 +0000</pubDate>

<item>
<title>soren on "insert custom content after each post"</title>
<link>http://themeshaper.com/forums/topic/insert-custom-content-after-each-post#post-18150</link>
<pubDate>Thu, 06 Jan 2011 10:50:48 +0000</pubDate>
<dc:creator>soren</dc:creator>
<guid isPermaLink="false">18150@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;OK,&#60;/p&#62;
&#60;p&#62;If I understand correctly, &#34;elseif&#34; for each different graphics you will use with the url included. So if I have 10 different graphics I need to have 10 rows with &#34;elseif&#34; statement?&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;Soren&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function add_post_content($content) {
if(is_single()) {
	$custom_content = get_post_meta($post-&#38;gt;ID, &#38;#39;hr&#38;#39;);
        if($custom_content==1) {
  $content .=
       }elseif($custom_content==2) {
  $content .=
       }elseif($custom_content==3) {
  $content .=
       }elseif($custom_content==4) {
  $content .=
       }elseif($custom_content==5) {
  $content .=
etc...

} else {
	//nothing
}
return $content;
}
add_filter(‘the_content’, ‘add_post_content’)&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>helgatheviking on "insert custom content after each post"</title>
<link>http://themeshaper.com/forums/topic/insert-custom-content-after-each-post#post-18025</link>
<pubDate>Fri, 31 Dec 2010 15:57:22 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">18025@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;i guess i didn't understand what you meant when you originally said your code &#34;wasn't doing much&#34;.  i took that to mean it wasn't working- tho looking again, it seems that it should be successful at applying 1 graphic to the end of your post.  &#60;/p&#62;
&#60;p&#62;now i see that you want to apply different graphics conditionally depending on a meta value, so why not call your custom field hr and then assign it different values... like 2, 3, 4, etc.  then you can use a conditional based on the meta value, similar to what you wrote in your original post.  &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function add_post_content($content) {
if(is_single()) {
	$custom_content = get_post_meta($post-&#38;gt;ID, &#38;#39;hr&#38;#39;);
	if($custom_content==1) {
	$content .= ‘&#38;lt;img src=&#38;quot;http://mydomian/wp-content/uploads/images/hr_1.gif&#38;quot; style=&#38;quot;margin: 60px auto 30px auto;&#38;quot; width=&#38;quot;555&#38;quot; height=&#38;quot;12&#38;quot; class=&#38;quot;aligncenter&#38;quot; /&#38;gt;&#38;#39;;
		$content .= ‘This article is copyright © ‘.date(‘Y’).’ ’.author(‘name’).”;
}elseif($custom_content==2) {
	$content .= ‘&#38;lt;img src=&#38;quot;http://mydomian/wp-content/uploads/images/hr_2.gif&#38;quot; style=&#38;quot;margin: 60px auto 30px auto;&#38;quot; width=&#38;quot;555&#38;quot; height=&#38;quot;12&#38;quot; class=&#38;quot;aligncenter&#38;quot; /&#38;gt;&#38;#39;;
		$content .= ‘This article is copyright © ‘.date(‘Y’).’ ’.author(‘name’).”;
} else {
	//nothing
}
return $content;
}
add_filter(‘the_content’, ‘add_post_content’);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>soren on "insert custom content after each post"</title>
<link>http://themeshaper.com/forums/topic/insert-custom-content-after-each-post#post-18023</link>
<pubDate>Fri, 31 Dec 2010 11:09:49 +0000</pubDate>
<dc:creator>soren</dc:creator>
<guid isPermaLink="false">18023@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Please can you elaborate more? Is this better? But still seems to not give me flexibility to use different hr lines depending on post by using custom fields!&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;Happy New Year everyone!&#60;/p&#62;
&#60;p&#62;Soren
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "insert custom content after each post"</title>
<link>http://themeshaper.com/forums/topic/insert-custom-content-after-each-post#post-17928</link>
<pubDate>Mon, 27 Dec 2010 17:00:53 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">17928@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;why not add an action to thematic_belowpost() ?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function add_post_content() {
if(is_single()) {
		$content .= &#38;#39;&#38;lt;img src=&#38;quot;http://mydomain/wp-content/uploads/images/hr_1.gif&#38;quot; style=&#38;quot;margin: 60px auto 30px auto;&#38;quot; alt=&#38;quot;&#38;quot; title=&#38;quot;&#38;quot; width=&#38;quot;555&#38;quot; height=&#38;quot;12&#38;quot; class=&#38;quot;aligncenter&#38;quot; /&#38;gt;&#38;#39;;
	}
	echo $content;
}
add_action(&#38;#39;thematic_belowpost&#38;#39;, &#38;#39;add_post_content&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>soren on "insert custom content after each post"</title>
<link>http://themeshaper.com/forums/topic/insert-custom-content-after-each-post#post-17916</link>
<pubDate>Sun, 26 Dec 2010 14:38:54 +0000</pubDate>
<dc:creator>soren</dc:creator>
<guid isPermaLink="false">17916@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;This is the code I use today in my function.php, but this one is not giving me much flexibility...&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function add_post_content($content) {
if(is_single()) {
		$content .= &#38;#39;&#38;lt;img src=&#38;quot;http://mydomain/wp-content/uploads/images/hr_1.gif&#38;quot; style=&#38;quot;margin: 60px auto 30px auto;&#38;quot; alt=&#38;quot;&#38;quot; title=&#38;quot;&#38;quot; width=&#38;quot;555&#38;quot; height=&#38;quot;12&#38;quot; class=&#38;quot;aligncenter&#38;quot; /&#38;gt;&#38;#39;;
	}
	return $content;
}
add_filter(&#38;#39;the_content&#38;#39;, &#38;#39;add_post_content&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>soren on "insert custom content after each post"</title>
<link>http://themeshaper.com/forums/topic/insert-custom-content-after-each-post#post-17915</link>
<pubDate>Sun, 26 Dec 2010 14:35:32 +0000</pubDate>
<dc:creator>soren</dc:creator>
<guid isPermaLink="false">17915@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello!&#60;/p&#62;
&#60;p&#62;I am using an &#34;Hr&#34; horisontal line (image) on every single post, but sometimes I would like to change the Hr line depending on the subject, I am also trying to get some text below or above (not sure yet where).&#60;/p&#62;
&#60;p&#62;Is it also possible to have a variety of hr lines, like if I use hr_3, hr_4 etc so it can search for ID that starts with &#34;hr&#34; is this possible?&#60;/p&#62;
&#60;p&#62;Here is a code that does not do much for me right now..&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Soren&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function add_post_content($content) {
if(is_single()) {
	$custom_content = get_post_meta($post-&#38;gt;ID, &#38;#39;hr_2&#38;#39;);
	if(is_empty($custom_content)) {
	$content .= ‘&#38;lt;img src=&#38;quot;http://mydomian/wp-content/uploads/images/hr_1.gif&#38;quot; style=&#38;quot;margin: 60px auto 30px auto;&#38;quot; width=&#38;quot;555&#38;quot; height=&#38;quot;12&#38;quot; class=&#38;quot;aligncenter&#38;quot; /&#38;gt;&#38;#39;;
		$content .= ‘This article is copyright © ‘.date(‘Y’).’ ’.author(‘name’).”;
}else{
	$content .= $custom_content;
}
return $content;
}
add_filter(‘the_content’, ‘add_post_content’);&#60;/code&#62;&#60;/pre&#62;</description>
</item>

</channel>
</rss>
