<?xml version="1.0" encoding="UTF-8"?><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" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" > <channel><title>Comments on: Thesis WordPress Theme: Adding Shortcodes to the Multimedia Box</title> <atom:link href="http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/feed/" rel="self" type="application/rss+xml" /><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/</link> <description>Webhosting with Free Warm Fuzzies</description> <lastBuildDate>Tue, 18 May 2010 04:07:03 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4078</link> <dc:creator>Benito</dc:creator> <pubDate>Tue, 18 May 2010 04:07:03 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4078</guid> <description>YES! A direct php call worked wonderfully. Not as flexible as learning to use shortcode throughout the custom_functions.php for any plugin but it gets the job done.For a final recap here is the final code that worked for me. (I replaced angle brackets with square ones.)/* Custom Email Collection Box --------------------------------------------------------*/ function custom_optin() { /* check to see if homepage. has to happen inside the function */ if (is_page(&#039;test&#039;) &#124;&#124; is_page(&#039;125&#039;)) { echo &#039;[div id=&quot;email-collect&quot;]&#039;; echo insert_cform(&#039;2&#039;); echo &#039;[/div]&#039;; } } add_action(&#039;thesis_hook_before_html&#039;,&#039;custom_optin&#039;);Thank you soo much again!</description> <content:encoded><![CDATA[<p>YES! A direct php call worked wonderfully. Not as flexible as learning to use shortcode throughout the custom_functions.php for any plugin but it gets the job done.</p><p>For a final recap here is the final code that worked for me. (I replaced angle brackets with square ones.)</p><p>/* Custom Email Collection Box<br /> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*/<br /> function custom_optin() {<br /> /* check to see if homepage. has to happen inside the function */<br /> if (is_page(&#8216;test&#8217;) || is_page(&#8217;125&#8242;)) {<br /> echo &#8216;[div id="email-collect"]&#8216;;<br /> echo insert_cform(&#8217;2&#8242;);<br /> echo &#8216;[/div]&#8216;;<br /> }<br /> }<br /> add_action(&#8216;thesis_hook_before_html&#8217;,'custom_optin&#8217;);</p><p>Thank you soo much again!</p> ]]></content:encoded> </item> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4077</link> <dc:creator>Benito</dc:creator> <pubDate>Tue, 18 May 2010 00:52:56 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4077</guid> <description>Hey, thanks so much for your tips thus far! I&#039;ll work through it and try the direct PHP call. Thanks again!</description> <content:encoded><![CDATA[<p>Hey, thanks so much for your tips thus far! I&#8217;ll work through it and try the direct PHP call. Thanks again!</p> ]]></content:encoded> </item> <item><title>By: Dixie</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4076</link> <dc:creator>Dixie</dc:creator> <pubDate>Mon, 17 May 2010 22:54:29 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4076</guid> <description>Benito, I&#039;m really not enough of a coder to effectively troubleshoot someone else&#039;s code, as you noted by the syntax error on what I gave you first. I don&#039;t code for clients because of my limited skillset in that area.Seeing as how you&#039;re close already, though, I do have a suggestion: why don&#039;t you drop the shortcode approach entirely? Cforms allows you to call forms directly in PHP:Alternatively, you can specifically insert a form (into the sidebar for instance etc.) per the PHP function call insert_cform(&#039;XYZ&#039;);, or alternatively insert_cform(); for the default/first form and/or insert_cform(&#039;X&#039;); for any other form.</description> <content:encoded><![CDATA[<p>Benito, I&#8217;m really not enough of a coder to effectively troubleshoot someone else&#8217;s code, as you noted by the syntax error on what I gave you first. I don&#8217;t code for clients because of my limited skillset in that area.</p><p>Seeing as how you&#8217;re close already, though, I do have a suggestion: why don&#8217;t you drop the shortcode approach entirely? Cforms allows you to call forms directly in PHP:</p><p>Alternatively, you can specifically insert a form (into the sidebar for instance etc.) per the PHP function call insert_cform(&#8216;XYZ&#8217;);, or alternatively insert_cform(); for the default/first form and/or insert_cform(&#8216;X&#8217;); for any other form.</p> ]]></content:encoded> </item> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4075</link> <dc:creator>Benito</dc:creator> <pubDate>Mon, 17 May 2010 22:11:19 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4075</guid> <description>Ok, I tried your code in my custom_function.php and got a parse error so i tried tweaking a few things. I also added a conditional statement so I can work on a test page to try this thing out.I&#039;m not having much luck getting the do_shortcode to run. Below is the code I ended up with and I am seeing the proper cformsII shortcode get populated in the html but it doesnt seem to be translating the shortcode.I&#039;ve added the test page where I&#039;m trying to make this happen. The content area contains the raw form as intended just so I know the form is configured correctly. What do you think?[* Custom Email Collection Box --------------------------------------------------------*] function custom_optin() {[* check to see if homepage. has to happen inside the function *] if (is_page(&#039;test&#039;) &#124;&#124; is_page(&#039;125&#039;)) { ?] [?php $myfunction= &#039;[!--cforms name=&quot;email collect&quot;--]&#039;; $myfunction_parsed = do_shortcode($myfunction); echo &#039;[div id=&quot;email-collect&quot;]&#039;; echo $myfunction_parsed; echo &#039;[/div]&#039;; } } add_action(&#039;thesis_hook_before_html&#039;,&#039;custom_optin&#039;);?] [?php</description> <content:encoded><![CDATA[<p>Ok, I tried your code in my custom_function.php and got a parse error so i tried tweaking a few things. I also added a conditional statement so I can work on a test page to try this thing out.</p><p>I&#8217;m not having much luck getting the do_shortcode to run. Below is the code I ended up with and I am seeing the proper cformsII shortcode get populated in the html but it doesnt seem to be translating the shortcode.</p><p>I&#8217;ve added the test page where I&#8217;m trying to make this happen. The content area contains the raw form as intended just so I know the form is configured correctly. What do you think?</p><p>[* Custom Email Collection Box<br /> --------------------------------------------------------*]<br /> function custom_optin() {</p><p>[* check to see if homepage. has to happen inside the function *]<br /> if (is_page(&#8216;test&#8217;) || is_page(&#8217;125&#8242;)) {<br /> ?]<br /> [?php<br /> $myfunction= '[!--cforms name="email collect"--]&#8216;;<br /> $myfunction_parsed = do_shortcode($myfunction);<br /> echo &#8216;[div id="email-collect"]&#8216;;<br /> echo $myfunction_parsed;<br /> echo &#8216;[/div]&#8216;;<br /> } }<br /> add_action(&#8216;thesis_hook_before_html&#8217;,'custom_optin&#8217;);?]<br /> [?php</p> ]]></content:encoded> </item> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4074</link> <dc:creator>Benito</dc:creator> <pubDate>Mon, 17 May 2010 20:53:27 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4074</guid> <description>WOW, You absolutely rock. Thanks for getting back to me at all. I&#039;ll try this asap and see how it works. You are a web goddess!</description> <content:encoded><![CDATA[<p>WOW, You absolutely rock. Thanks for getting back to me at all. I&#8217;ll try this asap and see how it works. You are a web goddess!</p> ]]></content:encoded> </item> <item><title>By: Dixie</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4069</link> <dc:creator>Dixie</dc:creator> <pubDate>Mon, 17 May 2010 16:40:09 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4069</guid> <description>Benito - Sorry it took me a while to get back to you. First time I tried, my code highlighter had some issues and it took me a bit to figure it out.I added an example to the end of post  with code. You have the right idea, but need to remember you&#039;re working in PHP so you have to echo the HTML part of your code to get it to work. Hope that helps!</description> <content:encoded><![CDATA[<p>Benito &#8211; Sorry it took me a while to get back to you. First time I tried, my code highlighter had some issues and it took me a bit to figure it out.</p><p>I added an example to the end of post  with code. You have the right idea, but need to remember you&#8217;re working in PHP so you have to echo the HTML part of your code to get it to work. Hope that helps!</p> ]]></content:encoded> </item> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4040</link> <dc:creator>Benito</dc:creator> <pubDate>Sun, 25 Apr 2010 16:08:33 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4040</guid> <description>arg.. using brackets. SOO sorry for spamming your post./* Custom Div Box --------------------------------------------------------------------*/ function custom_divs() { ?] [div id=&quot;email-collect&quot;] [?php echo do_shortcode(&quot;[!--cforms name=&#039;email collect&#039;--]&quot;); ?] [/div][?php }add_action(&#039;thesis_hook_before_html&#039;, &#039;custom_divs&#039;);</description> <content:encoded><![CDATA[<p>arg.. using brackets. SOO sorry for spamming your post.</p><p>/* Custom Div Box<br /> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*/<br /> function custom_divs() {<br /> ?]<br /> [div id="email-collect"]<br /> [?php echo do_shortcode("[!--cforms name='email collect'--]&#8220;); ?]<br /> [/div]</p><p> [?php<br /> }</p><p>add_action(&#8216;thesis_hook_before_html&#8217;, &#8216;custom_divs&#8217;);</p> ]]></content:encoded> </item> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4039</link> <dc:creator>Benito</dc:creator> <pubDate>Sun, 25 Apr 2010 16:06:58 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4039</guid> <description>Oops, the comment stripped out some of my code. Adding spaces to try to make it work./* Custom Div Box --------------------------------------------------------------------*/ function custom_divs() { ?&gt;&lt;?php echo do_shortcode(&quot; &quot;); ?&gt; &lt;?php } add_action(&#039;thesis_hook_before_html&#039;, &#039;custom_divs&#039;);</description> <content:encoded><![CDATA[<p>Oops, the comment stripped out some of my code. Adding spaces to try to make it work.</p><p>/* Custom Div Box<br /> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*/<br /> function custom_divs() {<br /> ?&gt;</p><p>&lt;?php echo do_shortcode(&quot; &#8220;); ?&gt;</p><p> &lt;?php<br /> }<br /> add_action(&#039;thesis_hook_before_html&#039;, &#039;custom_divs&#039;);</p> ]]></content:encoded> </item> <item><title>By: Benito</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4038</link> <dc:creator>Benito</dc:creator> <pubDate>Sun, 25 Apr 2010 16:03:54 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4038</guid> <description>Wow. Awesome post. I&#039;m sure a cleverer coder could figure this out using what you&#039;ve explained but is there a way to execute shortcode directly within custom_functions.php to create an arbitrary div? Ultimately, I&#039;m trying to create a email newsletter capture form to be placed at the top-right of each page (sorta like what you have popping up at goodkarmahost.com/blog, but using a pre-installed plugin I have called cformsII)Here&#039;s the closest I can get, but I feel like I&#039;m missing something.* Custom Div Box --------------------------------------------------------------------*/ function custom_divs() { ?&gt; &lt;?php echo do_shortcode(&quot;&lt;!--cforms name=&#039;email collect&#039;--&gt;&quot;); ?&gt; &lt;?php } add_action(&#039;thesis_hook_before_html&#039;, &#039;custom_divs&#039;);</description> <content:encoded><![CDATA[<p>Wow. Awesome post. I&#8217;m sure a cleverer coder could figure this out using what you&#8217;ve explained but is there a way to execute shortcode directly within custom_functions.php to create an arbitrary div? Ultimately, I&#8217;m trying to create a email newsletter capture form to be placed at the top-right of each page (sorta like what you have popping up at goodkarmahost.com/blog, but using a pre-installed plugin I have called cformsII)</p><p>Here&#8217;s the closest I can get, but I feel like I&#8217;m missing something.</p><p>* Custom Div Box<br /> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*/<br /> function custom_divs() {<br /> ?&gt;</p><p> &lt;?php echo do_shortcode(&quot;&#8220;); ?&gt;</p><p> &lt;?php<br /> }<br /> add_action(&#039;thesis_hook_before_html&#039;, &#039;custom_divs&#039;);</p> ]]></content:encoded> </item> <item><title>By: Dixie</title><link>http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/comment-page-1/#comment-4037</link> <dc:creator>Dixie</dc:creator> <pubDate>Tue, 20 Apr 2010 20:01:10 +0000</pubDate> <guid isPermaLink="false">http://goodkarmahost.com/?p=2162#comment-4037</guid> <description>How can I pass up an opportunity like that, Scott? 8)To have different shortcodes parsed on different pages, you&#039;d need a uniquely named function set up for each specific shortcode and use conditionals to call the proper bit of code. See the link in gray box above for WP conditionals to use; you can select by just about any combination of conditions you can imagine. Use the examples on the conditionals page to piece together the scenario you want.For OpenHook, add your if/then statements around each function and, of course, be sure to check the &quot;Execute PHP&quot; checkbox.For custom_functions.php, you need your if/then statements surrounding the add_action line, as this is the one that executes the code in custom functions.Does that help, or just muddying the water for ya?</description> <content:encoded><![CDATA[<p>How can I pass up an opportunity like that, Scott? <img src='http://goodkarmahost.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /></p><p>To have different shortcodes parsed on different pages, you&#8217;d need a uniquely named function set up for each specific shortcode and use conditionals to call the proper bit of code. See the link in gray box above for WP conditionals to use; you can select by just about any combination of conditions you can imagine. Use the examples on the conditionals page to piece together the scenario you want.</p><p>For OpenHook, add your if/then statements around each function and, of course, be sure to check the &#8220;Execute PHP&#8221; checkbox.</p><p>For custom_functions.php, you need your if/then statements surrounding the add_action line, as this is the one that executes the code in custom functions.</p><p>Does that help, or just muddying the water for ya?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching using disk
Content Delivery Network via Amazon Web Services: S3: gkh.s3.amazonaws.com

Served from: goodkarmahost.com @ 2010-09-08 20:34:09 -->