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: childtheme_override Help In Shaping WordPress Themes en Mon, 25 May 2015 15:28:41 +0000 thespareroomstudio on "childtheme_override bug?" Tue, 03 Apr 2012 09:40:08 +0000 thespareroomstudio 26144@ <p>Thanks for the help and links. Much appreciated. </p> sowingseeds on "childtheme_override bug?" Tue, 03 Apr 2012 09:26:08 +0000 sowingseeds 26143@ <p>Can't answer for the design, but I would say 'yes'. Most action hooks have nothing attached to them: aboveheader etc. They are there to have some action attached to them if needed. The ones in the header have division openings (+ other aspects) and division closure (as per brandingclose. The numbers position where in the header they appear - hence by using no 6 we are placing a function b4 the close of branding. We could have made an adjustment to the override and placed a function in the brandingclose hook - placing our function b4 the final echo command.</p> <p>Here is a generic guide to hooks and filters:<br /> <a href=""></a><br /> And for Thematic:<br /> <a href="">post-22638</a> </p> thespareroomstudio on "childtheme_override bug?" Tue, 03 Apr 2012 08:54:30 +0000 thespareroomstudio 26142@ <p>sowingseeds,</p> <p>Worked like a charm. Thanks. I feel better that I didn't have to edit Thematic's core. </p> <p>Do we know yet if this was intentional? I'm trying to find the logic of doing it this way, verses the rest of the overrides. </p> sowingseeds on "childtheme_override bug?" Mon, 02 Apr 2012 08:27:06 +0000 sowingseeds 26124@ <p>OK I think I get what you are looking for. Don't go and edit the thematic files. The hook you are looking to add to is thematic_header,6. 'thematic_brandingclose' is basically the closing division of branding, so assuming you want to add a function into branding - after blog-title and blog-description... but still inside branding:</p> <pre><code>function before_branding_closes() { //place function here } add_action(&#39;thematic_header&#39;, &#39;before_branding_closes&#39;, 6);</code></pre> <p>The '6' places it after 5 - site-description and before 7 - branding close. </p> thespareroomstudio on "childtheme_override bug?" Sun, 01 Apr 2012 21:40:59 +0000 thespareroomstudio 26120@ <p>sowingseeds, thanks for your reply.</p> <p>I actually have a different echo statement in my own function, I just chose to echo the closing div as an example to show add_action(). Sorry for the confusion. Allow me to clarify.</p> <p>I originally DID NOT have add_action in my function, but noticed that childtheme_override_brandingclose() was not executing. Upon inspecting the code in Thematic's core, I noticed that there is NO add_action if using childtheme_override_brandingclose() according to the conditional statement I included above. add_action is only implemented if there is NO childtheme_override_brandingclose(). Which brought me to my question... is that on purpose? To me, it would make sense if add_action('thematic_header', 'thematic_brandingclose', 7)'; was after the conditional. Such is the case in other childtheme_overrides that are NOT in the header. So I am wondering if this was missed or intentional. And if it is intentional, what would be the correct way for me to use the overrides?</p> <p>If I edit the Thematic Core file (gasp!) and move add_action after the conditional, my override function works. Obviously, this is not what I want to do.</p> <p>Hopefully that clarifies things a bit. Sorry about that. Thanks for the help. </p> sowingseeds on "childtheme_override bug?" Sun, 01 Apr 2012 19:54:57 +0000 sowingseeds 26119@ <p>Couple of things. If using childtheme_override_brandingclose you are overriding what is in thematic_brandingclose. Your code above 1) you are seeking to replace what is there with exactly the same code? 2) When you use an override you do not add it with an 'add_action' but simply:<br /> function chidtheme_override_***(){<br /> //my replacement code to what is in the original function;<br /> }</p> <p>No add_action needed. </p> thespareroomstudio on "childtheme_override bug?" Sun, 01 Apr 2012 19:30:01 +0000 thespareroomstudio 26118@ <p>Hello,</p> <p>Just started using Thematic, great work. I have a question though. It seems like all the childtheme_overrides in the thematic_header hook have the add_action in the wrong place in the conditional statement. For example, here is the code for childtheme_override_brandingclose():</p> <pre><code>if (function_exists(&#39;childtheme_override_brandingclose&#39;)) { function thematic_brandingclose() { childtheme_override_brandingclose(); } } else { function thematic_brandingclose() { echo &quot;\t\t&lt;/div&gt;&lt;!-- #branding --&gt;\n&quot;; } add_action(&#39;thematic_header&#39;,&#39;thematic_brandingclose&#39;,7); }</code></pre> <p>Is this done on purpose? If so, how do I add the hook correctly in my own function. I have tried both <code>add_action(&#39;thematic_header&#39;, &#39;thematic_brandingclose&#39;, 7);</code> and <code>add_action(&#39;thematic_header&#39;, &#39;childtheme_override_brandingclose&#39;, 7);</code> in my child theme's functions.php file. Both ways seem to not execute what I put in the function. Thanks for the help.</p> <pre><code>function childtheme_override_brandingclose() { echo &quot;\t\t&lt;/div&gt;&lt;!-- #branding --&gt;\n&quot;; add_action(&#39;themeatic_header&#39;, &#39;thematic_brandingclose&#39;, 7); }</code></pre> helgatheviking on "Not clear how childtheme_override works" Tue, 07 Jun 2011 22:12:17 +0000 helgatheviking 21713@ <p>not sure what bug you are seeing? </p> <p> might be official in the WP repo, but the latest version of Thematic is 0.9.8 which fixed a lot of bugs w/ the overrides</p> <p><a href="" rel="nofollow"></a> </p> Teenage on "Not clear how childtheme_override works" Tue, 07 Jun 2011 22:06:50 +0000 Teenage 21712@ <p>Hi,</p> <p>The official code ( still get this bug.</p> <p>I stumbled onto this page after looking for information about "childtheme_override_**" that still doesn't existe : <a href=";searchsubmit=Find" rel="nofollow">;searchsubmit=Find</a></p> <p>Please add the missing "add_action('thematic_header','thematic_***',X);" lines to the next release and update the documentation. </p> kirkroberts on "Not clear how childtheme_override works" Wed, 02 Feb 2011 18:55:50 +0000 kirkroberts 18905@ <p>Sweet, thanks! I'll check those out. </p> helgatheviking on "Not clear how childtheme_override works" Tue, 01 Feb 2011 16:22:44 +0000 helgatheviking 18875@ <p>you can either get:<br /> <a href="" rel="nofollow"></a></p> <p>or learn to get SVN from this great tut:<br /> <a href="" rel="nofollow"></a> </p> kirkroberts on "Not clear how childtheme_override works" Tue, 01 Feb 2011 14:03:37 +0000 kirkroberts 18870@ <p>I just recently downloaded Thematic and it seems this issue is not resolved in the package downloaded from<br /> I see how to fix it but don't want to overwrite core files.<br /> Not on the SVN train yet... sigh. </p> mirko77 on "Not clear how childtheme_override works" Fri, 12 Nov 2010 10:33:09 +0000 mirko77 16938@ <p>Oh yes...I overlooked that if statement! Thank you very much! </p> helgatheviking on "Not clear how childtheme_override works" Thu, 11 Nov 2010 13:07:41 +0000 helgatheviking 16907@ <p>thanks chris! </p> Chris on "Not clear how childtheme_override works" Thu, 11 Nov 2010 10:27:27 +0000 Chris 16904@ <p>Ok .. this one is fixed. Grab the latest SVN copy and remove the add_action call.</p> <p>Chris </p> Chris on "Not clear how childtheme_override works" Thu, 11 Nov 2010 08:55:40 +0000 Chris 16903@ <p>Hi,</p> <p>I'll check this later today. Normally the override functions should work without add_action. Unfortunately I had the add_action call inside the if-clause. We fixed a couple of these bugs in the latest SVN copies, but I'm not sure if we fixed this one.</p> <p>Chris </p> helgatheviking on "Not clear how childtheme_override works" Wed, 10 Nov 2010 16:13:28 +0000 helgatheviking 16876@ <p>actually if you take a look at the header-extensions.php file you will see exactly what happens w/ the override</p> <pre><code>// Open #branding // In the header div if (function_exists(&#39;childtheme_override_brandingopen&#39;)) { function thematic_brandingopen() { childtheme_override_brandingopen(); } } else { function thematic_brandingopen() { echo &quot;&lt;div id=\&quot;branding\&quot;&gt;\n&quot;; } add_action(&#39;thematic_header&#39;,&#39;thematic_brandingopen&#39;,1); }</code></pre> <p>look carefully, if childtheme_override_brandingopen exists then the action is NOT added to the thematic_header, hence you see nothing.</p> <p>i dont know that i agree w/ this behavior 100% but that's how it is. you need to add childtheme_override_brandingopen to the desired hook. try:</p> <pre><code>function childtheme_override_brandingopen(){ echo &quot;&lt;div id=&#39;branding&#39;&gt;&lt;div id=&#39;logo-container&#39;&gt;&lt;/div&gt;&lt;div id=&#39;social-links&#39;&gt; &lt;/div&gt;\n&quot;; } add_action(&#39;thematic_header&#39;,&#39;childtheme_override_brandingopen&#39;,1);</code></pre> antesark on "Not clear how childtheme_override works" Wed, 10 Nov 2010 14:37:04 +0000 antesark 16872@ <p>Try..<br /> <code><br /> function childtheme_override_brandingopen() { ?&gt;<br /> &lt;div id="branding"&gt;&lt;div id="logo-container"&gt;&lt;/div&gt;&lt;div id="social-links"&gt;&lt;/div&gt;<br /> &lt;?php }</p> <p>function childtheme_override_brandingclose() { ?&gt;<br /> &lt;/div&gt;&lt;!-- #branding --&gt;<br /> &lt;?php }<br /> </code><br /> And remember not to use add_action. </p> mirko77 on "Not clear how childtheme_override works" Wed, 10 Nov 2010 10:48:52 +0000 mirko77 16871@ <p>That is exactly what I did.<br /> I created my child theme with its own function.php, but my override function does not work.</p> <p>I have other custom functions in my own function.php and they all work </p> McSalty on "Not clear how childtheme_override works" Tue, 09 Nov 2010 16:16:04 +0000 McSalty 16844@ <p>The override functions are meant so you don't have to modify the original thematic source files.</p> <p>Create a new child theme (there are guides for how to do this online). In your child them folder, create "functions.php". Within functions.php, paste your code</p> <pre><code>function childtheme_override_brandingopen(){ echo &quot;&lt;div id=\&quot;branding\&quot;&gt;&lt;div id=&#39;logo-container&#39;&gt;&lt;/div&gt;&lt;div id=&#39;social-links&#39;&gt;&lt;/div&gt;\n&quot;; }</code></pre> <p>Now your child theme will automatically use this function instead of thematic's default. </p> mirko77 on "Not clear how childtheme_override works" Tue, 09 Nov 2010 14:51:42 +0000 mirko77 16842@ <p>I want to add a couple of &lt;div&gt; containers in my child theme header, inside #branding.</p> <p>If I modify the function thematic_brandingopen() directly in header-extension.php it works flawlessly:</p> <pre><code>function thematic_brandingopen() { echo &quot;&lt;div id=\&quot;branding\&quot;&gt;&lt;div id=&#39;logo-container&#39;&gt;&lt;/div&gt;&lt;div id=&#39;social-links&#39;&gt;&lt;/div&gt;\n&quot;; }</code></pre> <p>but if I create a childtheme_override_brandingopen() my whole #branding div container disappears...</p> <pre><code>function childtheme_override_brandingopen(){ echo &quot;&lt;div id=\&quot;branding\&quot;&gt;&lt;div id=&#39;logo-container&#39;&gt;&lt;/div&gt;&lt;div id=&#39;social-links&#39;&gt; &lt;/div&gt;\n&quot;; }</code></pre> <p>I do not know why it does not work... </p> em hr on "syntax question re: childtheme_override" Fri, 24 Sep 2010 18:28:37 +0000 em hr 15809@ <p>Nice :) </p> ridgely on "syntax question re: childtheme_override" Fri, 24 Sep 2010 17:39:13 +0000 ridgely 15808@ <p>Thanks Gene. I successfully overrode my very first postfooter, with my own subfunctions. :)<br /> Will probably start a new tip thread for custom post postfooters. </p> em hr on "syntax question re: childtheme_override" Fri, 24 Sep 2010 00:55:17 +0000 em hr 15798@ <p>Hi ridgely,</p> <p>If the original function is return(ing) a variable, then the override needs to be return(ed) as well.</p> <p>When you're looking at the override functions this is a good determiner of whether you can echo or if you need end your override with a return.</p> <p>-Gene </p> ridgely on "syntax question re: childtheme_override" Wed, 22 Sep 2010 20:49:50 +0000 ridgely 15777@ <p>Using the latest stable dev with childtheme_override functions available - question about syntax.<br /> Most of the time the childtheme_override looks like this:</p> <blockquote><p><code>if (function_exists('childtheme_override_something')) {<br /> function thematic_something() {<br /> childtheme_override_something();<br /> }<br /> } else {<br /> function thematic_something() {....;}}<br /> </code> </p></blockquote> <p>...which simply requires the child theme to contain <code>function childtheme_override_something();</code> somewhere in <code>functions.php</code>.</p> <p>But a bunch of the postheader and postfooter subfunctions are like:</p> <blockquote><p> <code><br /> if (function_exists('childtheme_override_something')) {<br /> function thematic_something() {<br /> return childtheme_override_something();<br /> }<br /> } else {<br /> function thematic_something() {....;}}<br /> </code> </p></blockquote> <p>Does this require any accommodating syntax change in the childtheme_override function? </p> ridgely on "Conditional childtheme_override" Tue, 07 Sep 2010 17:24:45 +0000 ridgely 15432@ <p>This mysteriously caused my "blog" page to go blank. Wonder why? </p> ridgely on "Conditional childtheme_override" Tue, 07 Sep 2010 03:02:06 +0000 ridgely 15418@ <p><strong>TAKE 2</strong><br /> This, however, worked:</p> <blockquote><pre><code>function my_conditional_category_loop() { if (is_category(&#39;drawing&#39;) || is_category(&#39;painting&#39;)) { while ( have_posts() ) : the_post(); thematic_abovepost(); ?&gt; &lt;div id=&quot;post-&lt;?php the_ID() ?&gt;&quot; class=&quot;&lt;?php thematic_post_class() ?&gt;&quot;&gt; &lt;?php thematic_postheader(); ?&gt; &lt;?php get_the_image( array( &#39;custom_key&#39; =&gt; array( &#39;Thumbnail&#39;, &#39;thumbnail&#39; ), &#39;default_size&#39; =&gt; &#39;thumbnail&#39; ) ); ?&gt; &lt;div class=&quot;entry-content&quot;&gt; &lt;?php thematic_content(); ?&gt; &lt;/div&gt; &lt;?php thematic_postfooter(); ?&gt; &lt;/div&gt;&lt;!-- .post --&gt; &lt;?php thematic_belowpost(); endwhile; } else { while (have_posts()) : the_post(); thematic_abovepost(); ?&gt; &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; class=&quot;&lt;?php thematic_post_class(); ?&gt;&quot;&gt; &lt;?php thematic_postheader(); ?&gt; &lt;div class=&quot;entry-content&quot;&gt; &lt;?php thematic_content(); ?&gt; &lt;/div&gt;&lt;!-- .entry-content --&gt; &lt;?php thematic_postfooter(); ?&gt; &lt;/div&gt;&lt;!-- #post --&gt; &lt;?php thematic_belowpost(); endwhile; } } // end category_loop function childtheme_override_category_loop() { echo my_conditional_category_loop(); }</code></pre> </blockquote> ridgely on "Conditional childtheme_override" Tue, 07 Sep 2010 01:47:53 +0000 ridgely 15417@ <p>So I put this in my functions file:<br /> <pre><code>function my_conditional_category_loop() { global $post; if (is_category(&#39;drawing&#39;) || is_category(&#39;painting&#39;)) { function childtheme_override_category_loop() { while ( have_posts()) : the_post() // Start the loop: ?&gt; &lt;div id=&quot;post-&lt;?php the_ID() ?&gt;&quot; class=&quot;&lt;?php thematic_post_class()?&gt;&quot;&gt; &lt;?php thematic_postheader(); ?&gt; &lt;?php get_the_image( array(&#39;custom_key&#39; =&gt; array( &#39;Thumbnail&#39;,&#39;thumbnail&#39; ),&#39;default_size&#39; =&gt; &#39;thumbnail&#39; ) ); ?&gt; &lt;div class=&quot;entry-content&quot;&gt; &lt;?php thematic_content();?&gt; &lt;/div&gt; &lt;?php thematic_postfooter(); ?&gt; &lt;/div&gt;&lt;!-- .post --&gt; &lt;?php endwhile; // loop done, go back up } } }</code></pre> <p>While the category pages that *aren't* drawing or painting came out ok, the <code>category-drawing</code> and <code>category-painting</code> pages came up with the <code>page-title</code> and <code>archive-meta</code>, period. These category posts are set with css to hide everything but the thumbnail, which should have been created per the function above. But no luck. What am I missing? </p> em hr on "Conditional childtheme_override" Tue, 07 Sep 2010 01:08:20 +0000 em hr 15416@ <p>The else is not necessary either.</p> <p>The override won't come into play if the condition is not met. So in that case we will fall back to the parent function regardless.</p> <p>Test it out :) </p> ridgely on "Conditional childtheme_override" Tue, 07 Sep 2010 00:39:04 +0000 ridgely 15414@ <p>By out I was thinking more of<br /> ...`else {<br /> return thematic_categoryloop();<br /> }`</p> <p>If the <code>else</code> statememt is necessary, then good to know. If the add_action is *not* necessary, then how/where does one insert <code>my_conditional_category_loop</code>? Or does the <code>global $post;</code> take care of that problem?</p> <p>You guys are great - so patient with the baby who learns by cut-and-paste. :) </p>