Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Warning: Cannot modify header information - headers already sent by (output started at /home/themes/public_html/forums/bb-includes/db-mysql.php:12) in /home/themes/public_html/forums/my-templates/kakumei-variant/rss2.php on line 1
ThemeShaper Forums Tag: hooks Help In Shaping WordPress Themes en Sun, 24 May 2015 11:06:41 +0000 wmarkusen on "Changing <title> layout using $doctitle" Wed, 01 Feb 2012 19:55:07 +0000 wmarkusen 25145@ <p>I found your post helpful in something I was trying to figure out. Thank you. </p> helgatheviking on "Hook for post "entry-content" class?" Thu, 05 Jan 2012 23:04:49 +0000 helgatheviking 24676@ <p>it was because you were escaping the ' where you didn't need to escape them.... \'medium\' instead of 'medium' </p> PMix on "Hook for post "entry-content" class?" Thu, 05 Jan 2012 20:45:37 +0000 PMix 24674@ <p>For whatever reason </p> <pre>function childtheme_feature_image($content) { global $post; $my_addition = get_the_post_thumbnail($post-&gt;ID,'medium'); $content = $my_addition . $content; return $content; } add_filter('thematic_post', 'childtheme_feature_image');</pre> <p>works. I can just style with the img tags instead of using the div tags. </p> <p>Thanks so much for your help. </p> PMix on "Hook for post "entry-content" class?" Thu, 05 Jan 2012 20:43:01 +0000 PMix 24673@ <p>I think the $my_addition line needs to be</p> <pre>$my_addition = '&lt;div id="inside-post-thumbnail"&gt; . get_the_post_thumbnail($post-&gt;ID,\'medium\') . &lt;/div&gt;';</pre> <p>but using that just outputs ". get_the_post_thumbnail($post-&gt;ID,'medium') ." inside the div tags. </p> helgatheviking on "Hook for post "entry-content" class?" Thu, 05 Jan 2012 14:57:37 +0000 helgatheviking 24662@ <p>when using filters you must not use code that ECHOS, you must RETURN values. the_post_thumbnail echoes. you are also weirdly shifting back and forth between html and php when you are trying to set your variable. </p> <p>try :</p> <pre><code>function childtheme_feature_image($content) { global $post; $my_addition = &#39;&lt;div id=&quot;inside-post-thumbnail&quot;&gt;. get_the_post_thumbnail($post-&gt;ID,&#39;medium&#39;) .&#39;&lt;/div&gt;&#39;; $content = $my_addition . $content; return $content; } add_filter(&#39;thematic_post&#39;, &#39;childtheme_feature_image&#39;);</code></pre> <p>most WP functions that echo something have a sister function that <em>gets</em> the value instead, for use w/ filters</p> <p><a href="" rel="nofollow"></a> </p> PMix on "Hook for post "entry-content" class?" Thu, 05 Jan 2012 08:21:04 +0000 PMix 24660@ <p>I would like to do essentially the same thing except I want to display the featured image for the post. When I use this code:</p> <pre><code>`function childtheme_feature_image($content) { $my_addition = '&lt;div id="inside-post-thumbnail"&gt; &lt;?php the_post_thumbnail(\'medium\');?&gt; &lt;/div&gt;'; $content = $my_addition . $content; return $content; } add_filter('thematic_post', 'childtheme_feature_image');</code></pre> <p>Wordpress doesn't end up running the php code to display the thumbnail image. The html outputs as </p> <pre><code>&lt;div id="inside-post-thumbnail"&gt; &lt;!--?php the_post_thumbnail('medium');?--&gt; &lt;/div&gt;</code></pre> <p>What do I do to get it to execute that line of php code? </p> helgatheviking on "Hook PHP script above post/page footer to hook Addtoany" Fri, 02 Dec 2011 00:49:20 +0000 helgatheviking 24052@ <p>have you read my introduction to primers and filters?<br /> <a href="" rel="nofollow"></a></p> <p>like i said before, to get it INSIDE of entry-utility, i think you'll need to copy the thematic_postfooter() function completely to your functions.php and rename it childtheme_override_postfooter() and add </p> <p>ADDTOANY_SHARE_SAVE_KIT(array($output_later=TRUE))</p> <p>somewhere in there </p> timothyd on "Hook PHP script above post/page footer to hook Addtoany" Thu, 01 Dec 2011 22:08:53 +0000 timothyd 24039@ <p>*floating it right I meant. </p> timothyd on "Hook PHP script above post/page footer to hook Addtoany" Thu, 01 Dec 2011 22:07:50 +0000 timothyd 24038@ <p>I actually placed it where I wanted by minimizing the width of the entry utility, changing clear:both to left, and changing the width of the Add to Any and floating it left. I can't seem to get a handle on these functions, hooks, etc. Probably a backwards way to go about it, but I find solace in CSS. </p> helgatheviking on "Hook PHP script above post/page footer to hook Addtoany" Thu, 01 Dec 2011 21:47:53 +0000 helgatheviking 24037@ <p>i have come a long way in my year since posting my original response... wherein my answer was incorrect. </p> <p>unless this plugin offers a function (or a parameter for the ADDTOANY_SHARE_SAVE_KIT() function) that "returns" a value in lieu of "echoing" a value, you cannot add this to the entry-utility via filter.</p> <p>you're lucky i seem to have too much time on my hands as it turns out that addtoany does have a return parameter. ;)</p> <pre><code>function childtheme_postfooter($postfooter) { if( function_exists(&#39;ADDTOANY_SHARE_SAVE_KIT&#39;) ) { $postfooter = $postfooter . ADDTOANY_SHARE_SAVE_KIT(array($output_later=TRUE)); } return $postfooter; } add_filter (&#39;thematic_postfooter&#39;, &#39;childtheme_postfooter&#39;);</code></pre> <p>this doesn't get it INSIDE post-utility however.... might need to hit another filter OR use an override </p> timothyd on "Hook PHP script above post/page footer to hook Addtoany" Thu, 01 Dec 2011 18:49:04 +0000 timothyd 24036@ <p>I am also trying to place the add to any share plugin in my entry utility. Ideas? I don't like it at the bottom of posts because I simply think it would look better if it were in line with my tags, comments etc. Please help! </p> helgatheviking on "WP Candy - An Introduction to Hooks" Sat, 03 Sep 2011 15:07:16 +0000 helgatheviking 22954@ <p>for newbs wondering about hooks and filters this is a decent tutorial:<br /> <a href="" rel="nofollow"></a> </p> craw on "adding widget areas under header" Fri, 26 Aug 2011 22:42:38 +0000 craw 22864@ <p>Hello all- I want to add 4 widget areas that will span across the page above the container and primary/secondary areas.</p> <p>My first question is- do they already exist and can I just style an existing widget area (like "widget-top")?</p> <p>If not, what document can you point me to to get started?</p> <p>Also, can I do this with hooks and/or filters? I'm pretty good styling thematic with css but I'm a novice when it comes to hooks/filters.</p> <p>Here is a diagram of what i'd like to accomplish- <a href="" rel="nofollow"></a> - basically, all the boxes with question marks I need help with.</p> <p>Thanks for any help </p> allenjcochran on "functions.php NOT working" Sun, 21 Aug 2011 23:35:55 +0000 allenjcochran 22786@ <p>Thanks! I figured it out. It worked perfectly. </p> helgatheviking on "functions.php NOT working" Fri, 19 Aug 2011 15:58:54 +0000 helgatheviking 22761@ <p>if they show up in text form they must not be properly enclosed in &lt;?php brackets</p> <p>functions.php must open w/ &lt;?php</p> <pre><code>&lt;?php function show_bacon(){ echo &quot; bacon here! &quot;; } add_action(&#39;thematic_belowheader&#39;,&#39;show_bacon&#39;); ?&gt;</code></pre> on "functions.php NOT working" Fri, 19 Aug 2011 13:03:37 +0000 22755@ <p>Allen, can you post the contents of you functions.php file in here? Enclose the code with the back tick ` symbol. </p> allenjcochran on "functions.php NOT working" Fri, 19 Aug 2011 04:56:34 +0000 allenjcochran 22749@ <p>I created a child theme for Thematic... first let me say it was great and the information on the web about customization is fantastic... however... I'm having a problem.</p> <p>When I add any functions to my functions.php file, they A) do not work and B) show up in text form at the top of my website. Can anyone tell me why that is and how to fix it? </p> noumaan on "Newbie: Editing Entry Meta and Entry Utility" Sun, 31 Jul 2011 19:49:33 +0000 noumaan 22486@ <p>Thank you helgatheviking </p> helgatheviking on "Newbie: Editing Entry Meta and Entry Utility" Sun, 31 Jul 2011 15:58:03 +0000 helgatheviking 22485@ <p>you can take a look at all the functions and filters available in the library/extensions folder of thematic. the postmeta and entryutility ones are in content-extensions.php specifically. </p> <p>NB: do NOT make changes in this file. all your tweaks go in your child's functions.php</p> <p>so with that you can either override the function completely.</p> <pre><code>function childtheme_override_postheader_postmeta(){ //do your thing }</code></pre> <p>or you can use filters... which you know are available anywhere you see apply_filters</p> <pre><code>return apply_filters(&#39;thematic_postheader_postmeta&#39;,$postmeta);</code></pre> <p>so to filter you'd do something like:</p> <pre><code>function child_postmeta($postmeta){ $postmeta = &quot;ADD BACON! &quot; . $postmeta; return $postmeta; } add_filter(&#39;thematic_postheader_postmeta&#39;,&#39;child_postmeta&#39;);</code></pre> noumaan on "Newbie: Editing Entry Meta and Entry Utility" Sun, 31 Jul 2011 01:24:36 +0000 noumaan 22482@ <p>Hi </p> <p>I am developing a child theme based on thematic for my website. I have previously only worked pretty straight forward themes with a few template files, functions.php and a stylesheet. This is the first time I am working with a theme framework to create a child theme. </p> <p>I want to edit the Entry Meta, and Entry Utility areas but I can't find where thematic creates the loop and what I need to add to my functions.php </p> <p>I understand that I need to modify a default thematic hook and replace it with my own. But which hook and where it is located? </p> ThomasTheme-as on "MIA - Basic Hook Customization Understandings Needed.." Thu, 26 May 2011 13:23:36 +0000 ThomasTheme-as 21474@ <p>Well you enlightened me much on the HTML code insertion.</p> <p>Ok so to understand 'yourscript'. 'yourscript' is the handle you have defined first with: </p> <p>wp_enqueue_script('yourscript', JS . '/path-to-your-script.js');</p> <p>THEN this function above also defines it as the script sitting in /path-to-your-script.js. This is my understanding.</p> <p>Thank you so much for getting me on a higher level of understanding, I think I am ready to get my hands dirty..</p> <p>You'll prob seeing more of me.. </p> helgatheviking on "MIA - Basic Hook Customization Understandings Needed.." Wed, 25 May 2011 20:44:30 +0000 helgatheviking 21470@ <p>i know some people find the WP Codex confusing, but there is still a TON of info there.</p> <p><a href="" rel="nofollow"></a></p> <p>1. 'yourscript' in my example is the <em>handle</em> for that script. think of it as a unique name for that script. it's purpose is so that 10 plugins can say enqueue the script with the handle 'jquery' and jquery will actually only be loaded once. you can also deregister a script if you know its handle. good for working w/ a plugin like Contact 7 which loads its script everywhere even though you probably only need it on the contact page.</p> <p>2. add the bacon function to your child theme's functions.php glad bacon could be of service! ;) </p> ThomasTheme-as on "MIA - Basic Hook Customization Understandings Needed.." Wed, 25 May 2011 20:04:44 +0000 ThomasTheme-as 21469@ <p>Wow thank you so much! I am self learning and a slow one at that, so I do so appreciate your patience and good effort with me. </p> <p>Two more questions, if I may press you further:<br /> (1) Referring to helgathehelpfulviking's jQuery post where she/you mention(s):</p> <p> wp_enqueue_script('yourscript', JS . '/path-to-your-script.js');</p> <p>Is 'yourscript', the script that you placed in the js folder?</p> <p>(2) where typically would the add_bacon function be added? To the footer or as joperron mentions to be made in the functions.php file.</p> <p>The add_bacon example really gave me the necessary understanding to move forward. </p> helgatheviking on "MIA - Basic Hook Customization Understandings Needed.." Wed, 25 May 2011 16:53:31 +0000 helgatheviking 21467@ <p>add html code anywhere:</p> <pre><code>function add_bacon(){ ?&gt; &lt;strong&gt;write as much bacon-flavored html as you like&lt;/strong&gt; &lt;?php } add_action(&#39;thematic_hook_of_your_choice&#39;,&#39;add_bacon&#39;);</code></pre> <p>add scripts to the footer (or anywhere really)<br /> <pre><code>function add_bacon_script() {?&gt; &lt;script&gt; jQuery.noConflict(); jQuery(document).ready(function($){ alert(bacon); }); &lt;/script&gt; ?&gt; add_action(&#39;wp_footer&#39;,&#39;add_bacon_script&#39;);</code></pre> <p>i do recommend that you go read my thread that joperron linked to.. which explains how to properly enqueue scripts. you <em>can</em> move the whole enqueue scripts thing out of the header and into the footer. i've done it, but often run into problems w/ plugins just willy-nilly adding scripts to wp_head which results in a lot of breakage b/c jquery hasn't loaded yet. </p> <p>for reference:</p> <pre><code>function clean_header(){ // JS - MOVE TO FOOTER remove_action(&#39;wp_head&#39;, &#39;wp_print_scripts&#39;); remove_action(&#39;wp_head&#39;, &#39;wp_print_head_scripts&#39;, 9); remove_action(&#39;wp_head&#39;, &#39;wp_enqueue_scripts&#39;, 1); add_action(&#39;wp_footer&#39;, &#39;wp_enqueue_scripts&#39;, 1); add_action(&#39;wp_footer&#39;, &#39;wp_print_scripts&#39;, 10); add_action(&#39;wp_footer&#39;, &#39;wp_print_head_scripts&#39;, 20); // CLEAN UP HEADER remove_action(&#39;wp_head&#39;,&#39;thematic_head_scripts&#39;); //thematic dropdowns remove_action( &#39;wp_head&#39;, &#39;wlwmanifest_link&#39;); // Removes link for Windows Live Writer users remove_action( &#39;wp_head&#39;, &#39;wp_generator&#39;); // Removes WP version remove_action( &#39;wp_head&#39;, &#39;rsd_link&#39; ); // Removes unneeded Really Simple Discovery link remove_action( &#39;wp_head&#39;, &#39;start_post_rel_link&#39;); //Remove relational start link remove_action( &#39;wp_head&#39;, &#39;adjacent_posts_rel_link_wp_head&#39;); // Remove prev/next relational links //use google&#39;s jquery if (!is_admin()){ wp_deregister_script( &#39;jquery&#39; ); wp_register_script(&#39;jquery&#39;, &#39;;); wp_enqueue_script(&#39;jquery&#39;); } } add_action(&#39;init&#39;,&#39;clean_header&#39;);</code></pre> joperron on "MIA - Basic Hook Customization Understandings Needed.." Wed, 25 May 2011 16:10:24 +0000 joperron 21466@ <p>Hey there,</p> <p>You can put you add_action right under your function in your functions.php file. The general consensus here is to as much (all?) of your modifications programmatically through functions.php </p> <p>You have to be careful with jQuery as it is already queued in your header. You might want to go over this thread: <a href="" rel="nofollow"></a></p> <p>Cheers </p> ThomasTheme-as on "MIA - Basic Hook Customization Understandings Needed.." Wed, 25 May 2011 15:37:25 +0000 ThomasTheme-as 21464@ <p>I am missing a fundamental conceptual understanding. My learning is at the tip of my tongue but not yet speaking..</p> <p>What I was wanting to know are the steps to making a customization with HTML or jQuery and hooking it in to a Theme.</p> <p>Lets say I want to add HTML code to the footer, lets say in particular to the bottom portion would I do as follows?</p> <p>(1) Create a function in the functions.php outlining the HTML, giving it a name, i.e. function my_footer and then<br /> (2) Hooking into the footer by placing : add_action('thematic_below_footer', 'my_footer') into the footer.php file?</p> <p>ALSO</p> <p>How do I "enqueue" javascript into a footer, would I do so like follows:</p> <p>(1) Allow for jQuery in the footer by creating function in functions.php file as in:<br /> function my_theme_js()<br /> {<br /> wp_enqueue_script('jQuery);<br /> wp_print_scripts();<br /> }<br /> add_action('wp_enqueue_scripts', 'my_theme_js')<br /> (2) In footer.php introduce javascript by invoking:<br /> add_action('thematic_belowfooter', 'my_theme_js')<br /> (3) then write in javascript in footer.</p> <p>Any help in getting me to talk, greatly appreciated.. </p> michaelh on "relative path to image file from functions.php" Sat, 21 May 2011 15:44:29 +0000 michaelh 21409@ <p>Edit: realized I put stuff in the wrong directory, please delete. :( </p> helgatheviking on "Hook for post "entry-content" class?" Thu, 07 Apr 2011 08:57:52 +0000 helgatheviking 20364@ <p>+1 for middlesister's solution </p> middlesister on "Hook for post "entry-content" class?" Thu, 07 Apr 2011 08:41:02 +0000 middlesister 20363@ <p>Try filtering thematic_post.</p> <pre><code>function childtheme_add_to_content($content) { $my_addition = &#39;image goes here&#39;; $content = $my_addition . $content; return $content; } add_filter(&#39;thematic_post&#39;, &#39;childtheme_add_to_content&#39;);</code></pre> stonefree on "Hook for post "entry-content" class?" Thu, 07 Apr 2011 06:18:56 +0000 stonefree 20362@ <p>I'm trying to insert some images at the beginning of every &lt;div class="entry-content"&gt; on all page templates . I couldn't find a hook in the documentation. What is the best way to do this? </p>