<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Support Forum - Topic: show page content in portfolio</title>
		<link>http://www.kriesi.at/support/topic/show-page-content-in-portfolio</link>
		<description>Support Forum - Topic: show page content in portfolio</description>
		<language>en-US</language>
		<pubDate>Sat, 25 May 2013 12:27:28 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/show-page-content-in-portfolio" rel="self" type="application/rss+xml" />

		<item>
			<title>Bubblegumkitten on "show page content in portfolio"</title>
			<link>http://www.kriesi.at/support/topic/show-page-content-in-portfolio#post-29745</link>
			<pubDate>Tue, 18 Oct 2011 17:59:30 +0000</pubDate>
			<dc:creator>Bubblegumkitten</dc:creator>
			<guid isPermaLink="false">29745@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi, &#60;/p&#62;
&#60;p&#62;I am wanting to use the above code as it is rather nifty and simple solution to adding content above the pictures on the portfolio pages. However I wish to call a different set of content dependant on which page you are on (I have multiple portfolio template pages).&#60;/p&#62;
&#60;p&#62;I had a go and in the end I managed a piece of code which worked perfectly - BUT it only works if I use wp_reset_query(); which of course then kills off the rest of the page and means I get the top content, but not the gallery underneith... there seems to be a conflict between my additional query and the one which calls in the content for the page template although I am unsure where or why.&#60;/p&#62;
&#60;p&#62;I left the function alterations as the code above and altered the code in the template_portfolio.php page to the below:&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;/p&#62;
&#60;p&#62;wp_reset_query();&#60;/p&#62;
&#60;p&#62;if(is_page(1099)){&#60;/p&#62;
&#60;p&#62;echo getPageContent(1099);&#60;/p&#62;
&#60;p&#62;} elseif(is_page(5)){&#60;/p&#62;
&#60;p&#62;echo getPageContent(5);&#60;/p&#62;
&#60;p&#62;} else {&#60;/p&#62;
&#60;p&#62;echo getPageContent(1096);&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;Without the wp_reset_query(); the page always displays the else echo call regardless of page. Any ideas of a workaround guys?&#60;/p&#62;
&#60;p&#62;Thanks in advance!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dude on "show page content in portfolio"</title>
			<link>http://www.kriesi.at/support/topic/show-page-content-in-portfolio#post-27054</link>
			<pubDate>Thu, 15 Sep 2011 09:44:30 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">27054@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Thanks for your code snippet/input - it will help other users for sure :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brouge on "show page content in portfolio"</title>
			<link>http://www.kriesi.at/support/topic/show-page-content-in-portfolio#post-27043</link>
			<pubDate>Thu, 15 Sep 2011 09:03:28 +0000</pubDate>
			<dc:creator>brouge</dc:creator>
			<guid isPermaLink="false">27043@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;hey dude,&#60;/p&#62;
&#60;p&#62;it is possible if you extent the functions.php of the them with the following code:&#60;/p&#62;
&#60;p&#62;if(!function_exists('getPageContent'))&#60;br /&#62;
	{&#60;br /&#62;
		function getPageContent($pageId)&#60;br /&#62;
		{&#60;br /&#62;
			if(!is_numeric($pageId))&#60;br /&#62;
			{&#60;br /&#62;
				return;&#60;br /&#62;
			}&#60;br /&#62;
			global $wpdb;&#60;br /&#62;
			$sql_query = 'SELECT DISTINCT * FROM ' . $wpdb-&#38;gt;posts .&#60;br /&#62;
			' WHERE ' . $wpdb-&#38;gt;posts . '.ID=' . $pageId;&#60;br /&#62;
			$posts = $wpdb-&#38;gt;get_results($sql_query);&#60;br /&#62;
			if(!empty($posts))&#60;br /&#62;
			{&#60;br /&#62;
				foreach($posts as $post)&#60;br /&#62;
				{&#60;br /&#62;
					return nl2br($post-&#38;gt;post_content);&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;in the in the template_portfolio.php choose the place where you like to display the portfolio page content and type:&#60;br /&#62;
&#38;lt;?php echo getPageContent(id); ?&#38;gt;&#60;br /&#62;
id = the page id from your portfolio page&#60;/p&#62;
&#60;p&#62;this works quite well for my needs.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dude on "show page content in portfolio"</title>
			<link>http://www.kriesi.at/support/topic/show-page-content-in-portfolio#post-27022</link>
			<pubDate>Thu, 15 Sep 2011 06:19:14 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">27022@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hey,&#60;br /&#62;
the portfolio (overview) pages don't support additional content but display portfolio items only. I'm sorry.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brouge on "show page content in portfolio"</title>
			<link>http://www.kriesi.at/support/topic/show-page-content-in-portfolio#post-26992</link>
			<pubDate>Wed, 14 Sep 2011 22:48:15 +0000</pubDate>
			<dc:creator>brouge</dc:creator>
			<guid isPermaLink="false">26992@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;hello &#60;/p&#62;
&#60;p&#62;i'd like to know how it is possible to let the page content be shown.&#60;br /&#62;
lets say i have a page with some text. if i set it to the portfolio template, you cannot see the text.&#60;br /&#62;
i tried &#38;lt;?php the_content(); ?&#38;gt; but it won't work.&#60;/p&#62;
&#60;p&#62;best regards&#60;br /&#62;
thomas
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
