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: functions.php http://forums.themeshaper.com/ Help In Shaping WordPress Themes en Thu, 28 May 2015 19:56:49 +0000 helgatheviking on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26962 Fri, 11 May 2012 03:26:06 +0000 helgatheviking 26962@http://forums.themeshaper.com/ <p>i should reinsert my brain from time to time. that's a neat trick. actually, middlesister has convinced me that this bit of code is "doing it wrong"... in the sense that it is <em>hard-coding</em> things into doc-title that seo plugins then have to bludgeon to get out of there.... or can't at all. </p> <p>a better approach might be<br /> <pre><code>&lt;title&gt;&lt;?php wp_title( &#39;|&#39;, true, &#39;right&#39; ); ?&gt;&lt;/title&gt;</code></pre> <p>and then filter in the rest via the wp_title filter that lives inside the wp_title function. </p> PitaMaria on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26961 Fri, 11 May 2012 03:10:16 +0000 PitaMaria 26961@http://forums.themeshaper.com/ <p>Thanks, gang, for your replies. I was mixing up this issue with another project built on TwentyTen. Re-inserting brain now. </p> helgatheviking on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26950 Thu, 10 May 2012 14:12:33 +0000 helgatheviking 26950@http://forums.themeshaper.com/ <p>this code is automatically added via thematic_doctitle() in the default header.php. so there is no need to manually include it in a child header.php </p> tammai on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26946 Thu, 10 May 2012 09:53:02 +0000 tammai 26946@http://forums.themeshaper.com/ <p>I think you can create new function name childtheme_override_doctitle() in your functions.php then put your code into that. </p> PitaMaria on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26930 Thu, 10 May 2012 04:37:48 +0000 PitaMaria 26930@http://forums.themeshaper.com/ <p>@ScottNix: Yes, I'm using a Thematic child theme. That snippet is being used successfully in my child theme's header.php file ... I'm just trying to eliminate all child theme files except for style.css and functions.php, and the page-titling automation this snippet provides is the only thing keeping me from doing that.</p> <p>Am I understanding you correctly that I could do something to an extensions file in my child theme? What's that? </p> ScottNix on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26922 Thu, 10 May 2012 00:08:29 +0000 ScottNix 26922@http://forums.themeshaper.com/ <p>Hmm, I know this is going to come up. Are you using a Thematic Child Theme? It would take some serious butchering to work this into a child theme considering all the relevant information for titles is handled in the extensions file. :/</p> <p>There is something else going on here, more to fix than just converting this to a functions.php snippet. </p> PitaMaria on "move code from header file to functions.php" http://forums.themeshaper.com/topic/move-code-from-header-file-to-functionsphp#post-26921 Thu, 10 May 2012 00:03:35 +0000 PitaMaria 26921@http://forums.themeshaper.com/ <p>Apologies if this topic is covered in this forum; I searched but couldn't find anything relevant.</p> <p>I'm using the code below to customize page titles, but have only figured out how to make it work placed in my child theme's header.php file. Is it possible to move this code out of that header file and put it in my functions.php? If so, would you be so kind as to provide the syntax that I may copy and paste? Thanks in advance for your attention to this issue.</p> <pre><code>&lt;title&gt;&lt;?php /* * Print the &lt;title&gt; tag based on what is being viewed. */ global $page, $paged; wp_title( &#39;|&#39;, true, &#39;right&#39; ); // Add the blog name. bloginfo( &#39;name&#39; ); // Add the blog description for the home/front page. $site_description = get_bloginfo( &#39;description&#39;, &#39;display&#39; ); if ( $site_description &#38;&#38; ( is_home() || is_front_page() ) ) echo &quot; | $site_description&quot;; // Add a page number if necessary: if ( $paged &gt;= 2 || $page &gt;= 2 ) echo &#39; | &#39; . sprintf( __( &#39;Page %s&#39;, &#39;twentyten&#39; ), max( $paged, $page ) ); ?&gt;&lt;/title&gt;</code></pre> ChocHippo on "When is home page home? [child theme]" http://forums.themeshaper.com/topic/when-is-home-page-home-child-theme#post-25377 Tue, 14 Feb 2012 08:26:35 +0000 ChocHippo 25377@http://forums.themeshaper.com/ <p>Had the same problem - reading the same book (Sitepoint's "Build Your Own Wicked Wordpress Theme"). Have been going loco trying to find the solution - until I found this forum - front-page.php fixed everything! THANK YOU so much for explaining!!! </p> sixfootjames on "CSS3 Pie working on home page but not on other pages" http://forums.themeshaper.com/topic/css3-pie-working-on-home-page-but-not-on-other-pages#post-25198 Mon, 06 Feb 2012 19:35:40 +0000 sixfootjames 25198@http://forums.themeshaper.com/ <p>Stuck it in the root and works a charm!</p> <p>behavior: url(/PIE.php);</p> <p>Thanks! </p> sixfootjames on "CSS3 Pie working on home page but not on other pages" http://forums.themeshaper.com/topic/css3-pie-working-on-home-page-but-not-on-other-pages#post-25197 Mon, 06 Feb 2012 17:04:32 +0000 sixfootjames 25197@http://forums.themeshaper.com/ <p>Hi,</p> <p>Thanks to everyone who's helped me with my first ever full WordPress CMS implementation and Thematic as the framework!</p> <p>I was wondering though if someone might be able to tell me why it is that CSS3 Pie would work on my home page and not on the other template pages please?</p> <p>Here's the link to my site. <a href="http://goo.gl/Gc5rB" rel="nofollow">http://goo.gl/Gc5rB</a></p> <p>In my functions.php file I have the following, I would assueme, it shoule work on all pages especially the header which is shared across all pages.</p> <p> function my_render_ie_pie() {<br /> echo '<br /> &lt;!--[if lte IE 8]&gt;<br /> &lt;style type="text/css" media="screen"&gt;<br /> #branding,<br /> #access .menu,<br /> #container .home-content .entry-content,<br /> #container .home-content .entry-content .homeFeatureLeft a,<br /> .featureBlocks,<br /> .featureBlocks a,<br /> .home-content #slider,<br /> #content-left,<br /> #content-right,<br /> .staffDetail ul.staffProfileMenu,<br /> .staffDetail ul.staffProfileMenu li a,<br /> #content-left ul li a,<br /> #content-left ul.children li a<br /> {<br /> behavior: url(PIE.php);<br /> }<br /> &lt;/style&gt;<br /> &lt;![endif]--&gt;<br /> ';<br /> }<br /> add_action('wp_head', 'my_render_ie_pie', 8);</p> <p>Many thanks,<br /> James </p> linup on "Changing page-title contents using functions.php" http://forums.themeshaper.com/topic/changing-page-title-contents-using-functionsphp#post-25091 Mon, 30 Jan 2012 18:09:54 +0000 linup 25091@http://forums.themeshaper.com/ <p>Thanks ScottNix &#38; helgatheviking for the tips! </p> helgatheviking on "Changing page-title contents using functions.php" http://forums.themeshaper.com/topic/changing-page-title-contents-using-functionsphp#post-25086 Mon, 30 Jan 2012 15:07:33 +0000 helgatheviking 25086@http://forums.themeshaper.com/ <p>some explanation of actions and filters<br /> <a href="http://forums.themeshaper.com/topic/need-help-understanding-actions-vs-filters-and-changing-post-meta-and-utility#post-22638" rel="nofollow">http://forums.themeshaper.com/topic/need-help-understanding-actions-vs-filters-and-changing-post-meta-and-utility#post-22638</a> </p> ScottNix on "Changing page-title contents using functions.php" http://forums.themeshaper.com/topic/changing-page-title-contents-using-functionsphp#post-25080 Mon, 30 Jan 2012 07:56:23 +0000 ScottNix 25080@http://forums.themeshaper.com/ <p>I wouldn't be the one to walk you through as there are a bunch of different details, but this is just an easy filter.</p> <pre><code>function childtheme_page_title($content) { if (is_category()) { $content = &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= __(&#39;Custom Text or Remove:&#39;, &#39;thematic&#39;); $content .= &#39; &lt;span&gt;&#39;; $content .= single_cat_title(&#39;&#39;, FALSE); $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39; . &quot;\n&quot;; $content .= &#39;&lt;div class=&quot;archive-meta&quot;&gt;&#39;; if ( !(&#39;&#39;== category_description()) ) : $content .= apply_filters(&#39;archive_meta&#39;, category_description()); endif; $content .= &#39;&lt;/div&gt;&#39;; } return $content; } add_filter(&#39;thematic_page_title&#39;,&#39;childtheme_page_title&#39;);</code></pre> <p>It will now output "Custom Text or Remove:", you can just remove or change the text there. </p> <p>If you were doing a bunch of modifications to all your page titles, you would probably want to then use an override. To override, it looks like this.</p> <pre><code>function childtheme_override_page_title() { global $post; $content = &#39;&#39;; if (is_attachment()) { $content .= &#39;&lt;h2 class=&quot;page-title&quot;&gt;&lt;a href=&quot;&#39;; $content .= apply_filters(&#39;the_permalink&#39;,get_permalink($post-&gt;post_parent)); $content .= &#39;&quot; rev=&quot;attachment&quot;&gt;&lt;span class=&quot;meta-nav&quot;&gt;&amp;laquo; &lt;/span&gt;&#39;; $content .= get_the_title($post-&gt;post_parent); $content .= &#39;&lt;/a&gt;&lt;/h2&gt;&#39;; } elseif (is_author()) { $content .= &#39;&lt;h1 class=&quot;page-title author&quot;&gt;&#39;; $author = get_the_author_meta( &#39;display_name&#39; ); $content .= __(&#39;Author Archives: &#39;, &#39;thematic&#39;); $content .= &#39;&lt;span&gt;&#39;; $content .= $author; $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39;; } elseif (is_category()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= __(&#39;Category Archives:&#39;, &#39;thematic&#39;); $content .= &#39; &lt;span&gt;&#39;; $content .= single_cat_title(&#39;&#39;, FALSE); $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39; . &quot;\n&quot;; $content .= &#39;&lt;div class=&quot;archive-meta&quot;&gt;&#39;; if ( !(&#39;&#39;== category_description()) ) : $content .= apply_filters(&#39;archive_meta&#39;, category_description()); endif; $content .= &#39;&lt;/div&gt;&#39;; } elseif (is_search()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= __(&#39;Search Results for:&#39;, &#39;thematic&#39;); $content .= &#39; &lt;span id=&quot;search-terms&quot;&gt;&#39;; $content .= esc_html(stripslashes($_GET[&#39;s&#39;])); $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39;; } elseif (is_tag()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= __(&#39;Tag Archives:&#39;, &#39;thematic&#39;); $content .= &#39; &lt;span&gt;&#39;; $content .= __(thematic_tag_query()); $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39;; } elseif (is_tax()) { global $taxonomy; $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $tax = get_taxonomy($taxonomy); $content .= $tax-&gt;labels-&gt;name . &#39; &#39;; $content .= __(&#39;Archives:&#39;, &#39;thematic&#39;); $content .= &#39; &lt;span&gt;&#39;; $content .= thematic_get_term_name(); $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39;; } elseif (is_day()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= sprintf(__(&#39;Daily Archives: &lt;span&gt;%s&lt;/span&gt;&#39;, &#39;thematic&#39;), get_the_time(get_option(&#39;date_format&#39;))); $content .= &#39;&lt;/h1&gt;&#39;; } elseif (is_month()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= sprintf(__(&#39;Monthly Archives: &lt;span&gt;%s&lt;/span&gt;&#39;, &#39;thematic&#39;), get_the_time(&#39;F Y&#39;)); $content .= &#39;&lt;/h1&gt;&#39;; } elseif (is_year()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= sprintf(__(&#39;Yearly Archives: &lt;span&gt;%s&lt;/span&gt;&#39;, &#39;thematic&#39;), get_the_time(&#39;Y&#39;)); $content .= &#39;&lt;/h1&gt;&#39;; } elseif (isset($_GET[&#39;paged&#39;]) &#38;&#38; !empty($_GET[&#39;paged&#39;])) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= __(&#39;Blog Archives&#39;, &#39;thematic&#39;); $content .= &#39;&lt;/h1&gt;&#39;; } $content .= &quot;\n&quot;; echo apply_filters(&#39;thematic_page_title&#39;, $content); }</code></pre> linup on "Changing page-title contents using functions.php" http://forums.themeshaper.com/topic/changing-page-title-contents-using-functionsphp#post-25079 Mon, 30 Jan 2012 06:36:55 +0000 linup 25079@http://forums.themeshaper.com/ <p>Hi there-<br /> Loving this framework, but am new to any development &#38; need some guidance as to how to change things using filters &#38; action hooks....<br /> For example, I need to get rid of the words "category archives" on my cat archives pages. These are default in the "page-title."<br /> I found the related code in content-extensions.php file (library &gt; extensions folder). See below. I know I have to make this happen in my functions.php file in my child theme... but I am not clear on what to write in the functions.php code to get rid of the words, Category Archives.<br /> Would someone be so kind as to walk me through this?<br /> Thanks in advance... and thanks for this time-saving gem of a theme!<br /> Lindsay<br /> <pre><code>Code from content-extensions.php // Filter the page title // located in archive.php, attachement.php, author.php, category.php, search.php, tag.php if (function_exists(&#39;childtheme_override_page_title&#39;)) { function thematic_page_title() { childtheme_override_page_title(); } } elseif (is_category()) { $content .= &#39;&lt;h1 class=&quot;page-title&quot;&gt;&#39;; $content .= __(&#39;Category Archives:&#39;, &#39;thematic&#39;); $content .= &#39; &lt;span&gt;&#39;; $content .= single_cat_title(&#39;&#39;, FALSE); $content .= &#39;&lt;/span&gt;&lt;/h1&gt;&#39; . &quot;\n&quot;; $content .= &#39;&lt;div class=&quot;archive-meta&quot;&gt;&#39;; if ( !(&#39;&#39;== category_description()) ) : $content .= apply_filters(&#39;archive_meta&#39;, category_description()); endif; $content .= &#39;&lt;/div&gt;&#39;;</code></pre> helgatheviking on "location of "indexloop"" http://forums.themeshaper.com/topic/location-of-indexloop#post-24841 Thu, 12 Jan 2012 19:20:39 +0000 helgatheviking 24841@http://forums.themeshaper.com/ <p>that isn't a dead end. that is just the beginning.. actually it is the definition of an action HOOK. look into the library/extensions folder to see how deep the rabbit hole goes. </p> <p>oh hai there.... you'll find :</p> <pre><code>// The Index Loop if (function_exists(&#39;childtheme_override_index_loop&#39;)) { function thematic_index_loop() { childtheme_override_index_loop(); } } else { function thematic_index_loop() { global $options, $blog_id; foreach ($options as $value) { if (get_option( $value[&#39;id&#39;] ) === FALSE) { $$value[&#39;id&#39;] = $value[&#39;std&#39;]; } else { if (THEMATIC_MB) { $$value[&#39;id&#39;] = get_option($blog_id, $value[&#39;id&#39;] ); } else { $$value[&#39;id&#39;] = get_option( $value[&#39;id&#39;] ); } } } /* Count the number of posts so we can insert a widgetized area */ $count = 1; while ( have_posts() ) : the_post(); thematic_abovepost(); ?&gt; &lt;div id=&quot;post-&lt;?php the_ID(); echo &#39;&quot; &#39;; if (!(THEMATIC_COMPATIBLE_POST_CLASS)) { post_class(); echo &#39;&gt;&#39;; } else { echo &#39;class=&quot;&#39;; thematic_post_class(); echo &#39;&quot;&gt;&#39;; } thematic_postheader(); ?&gt; &lt;div class=&quot;entry-content&quot;&gt; &lt;?php thematic_content(); ?&gt; &lt;?php wp_link_pages(&#39;before=&lt;div class=&quot;page-link&quot;&gt;&#39; .__(&#39;Pages:&#39;, &#39;thematic&#39;) . &#39;&#38;after=&lt;/div&gt;&#39;) ?&gt; &lt;/div&gt;&lt;!-- .entry-content --&gt; &lt;?php thematic_postfooter(); ?&gt; &lt;/div&gt;&lt;!-- #post --&gt; &lt;?php thematic_belowpost(); comments_template(); if ($count==$thm_insert_position) { get_sidebar(&#39;index-insert&#39;); } $count = $count + 1; endwhile; } } // end index_loop add_action(&#39;thematic_indexloop&#39;, &#39;thematic_index_loop&#39;);</code></pre> <p>very last line says that the function thematic_index_loop() has been added to that hook you found, thematic_indexloop() yes there IS a one HYPHEN difference between the hook and the function that gets added to it.</p> <p>edited to add: don't go changing stuff in the extensions folder. copy the whole thematic_index_loop() function into your child's functions.php, rename the function to childtheme_override_index() and then hack away. if you look at the above function, you'll not that thematic checks for the presence of that function and will preferentially use your function before falling back on its own loop function. </p> alxvallejo on "location of "indexloop"" http://forums.themeshaper.com/topic/location-of-indexloop#post-24840 Thu, 12 Jan 2012 19:02:37 +0000 alxvallejo 24840@http://forums.themeshaper.com/ <p>I know this is an ancient post so forgive me:</p> <p>The function for the index loop is:</p> <p>function thematic_indexloop() {<br /> do_action('thematic_indexloop');<br /> } // end thematic_indexloop</p> <p>To me, this looks like a dead end. How can I alter the behavior in my own child theme? </p> cookieandkate on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24757 Mon, 09 Jan 2012 13:35:54 +0000 cookieandkate 24757@http://forums.themeshaper.com/ <p>Thanks again for your help. I was adding your code to my child theme's functions.php, so I don't know why it didn't work as provided. </p> proto on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24753 Mon, 09 Jan 2012 10:07:29 +0000 proto 24753@http://forums.themeshaper.com/ <p>Isn't Helga brilliant! </p> <p>Helga is somewhat of champion of helping people, she's be kind enough to help me out of many scrapes or tap me on the shoulder to see the bigger picture! </p> <p>Cookieandkate - thanks for posting your reply and solution here. I just thought I'd add one more thought. The code I gave was for your child theme "functions.php" file (assuming you're using a child theme!) If you're not, there are numerous reasons to use a child theme over modifying the Thematic theme directly, too many to mention here but it really does make your life SO much easier in the long run for updates etc. I tested the code I posted here before adding and just tested again and it seemed to work ok. </p> <p>Any errors may be because you might have been because the code I gave you was added somewhere else other than your child theme "functions.php" file or the PHP and HTML must be separated, otherwise it will cause errors! Just in case anyone was reading this thread and wanted to know :) </p> helgatheviking on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24752 Mon, 09 Jan 2012 07:31:48 +0000 helgatheviking 24752@http://forums.themeshaper.com/ <p>you got it... now just remember that add stuff to any hook works the same way and with great power comes great responsibility! :) </p> cookieandkate on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24750 Mon, 09 Jan 2012 05:13:47 +0000 cookieandkate 24750@http://forums.themeshaper.com/ <p>Thanks for our help! I finally understand how hooks work now. I tried using the code given by proto above, but I kept receiving error messages. I then based my code off the code that was working for my &lt;head&gt; section. Here it is:<br /> <pre><code>// CODENAME code goes before end body tag function CODENAME_code_beforeendbody() { ?&gt; CODE GOES HERE &lt;?php } add_action (&#39;thematic_after&#39;, &#39;CODENAME_code_beforeendbody&#39;);</code></pre> <p>I assume that I did that correctly, considering that I didn't receive an error message this time. Hope the code helps anyone who may need to add code before the &lt;/body&gt; tag. </p> proto on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24700 Fri, 06 Jan 2012 14:51:20 +0000 proto 24700@http://forums.themeshaper.com/ <p>Hello cookieandkate,</p> <p>I'd only add a little background for future reference to Helga's good advice! (Who by the way is an absolute angel of a helper!)</p> <p>You can do this by hooking onto one of Thematic's many hooks. Assuming you're new to this (apologies if you're not) Thematic comes with lots of hooks where you optionally add content / markup etc to. These hooks are like pieces of velcro and if you enter the right code you hook onto these velcro hooks markup and content.</p> <p>One way you can do this is to add your code to one of the velcro 'hooks' that are located before the end of the body tag. In thematic's case this is called "thematic_after;"</p> <p>So your code might look like this:</p> <pre><code>// Action hook for placing code before end body tag function webmagic_code_beforeendbody() { echo(&#39;INSERT YOUR CODE SNIPPET HERE&#39;) ;} add_action (&#39;thematic_after&#39;, &#39;webmagic_code_beforeendbody&#39;);</code></pre> <p>The "webmagic_code_beforeendbody" with a unique name, perhaps something like 'webmagic' (sub in your own name) to ensure it doesn't conflict with any of wordpress native commands.</p> <p>There are many other velcro type hooks in the footer, for example. To find out where the hooks are have a look in the Thematics "footer.php" and other files, you'll see them there.</p> <p>**You'd place the code snippet above in your child theme's functions.php file. Child themes are the way to go as your site can update but retain all your unique customisations. </p> helgatheviking on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24698 Fri, 06 Jan 2012 14:42:30 +0000 helgatheviking 24698@http://forums.themeshaper.com/ <p>the same way you add anything to any hook. </p> <p>look at <a href="http://visualizing.thematic4you.com" rel="nofollow">http://visualizing.thematic4you.com</a></p> <p>and you will see that thematic has a hook exactly where you are asking: thematic_after(); </p> cookieandkate on "how to add code before </body>" http://forums.themeshaper.com/topic/how-to-add-code-before-ltbodygt#post-24694 Fri, 06 Jan 2012 05:50:29 +0000 cookieandkate 24694@http://forums.themeshaper.com/ <p>Hello, I need to insert a snippet of code right before the &lt;/body&gt; tag on each page of my site. I know I've accomplished something similar with the head section, thanks to your help, but I'm no good at tinkering with PHP code. Does anyone know how to insert code immediately preceding the &lt;/body&gt; tag?</p> <p>Thank you so much for your help!<br /> Kate </p> FriedrichS. on "jQuery slider above every post-title" http://forums.themeshaper.com/topic/jquery-slider-above-every-post-title#post-24232 Sun, 11 Dec 2011 21:33:32 +0000 FriedrichS. 24232@http://forums.themeshaper.com/ <p>Hi, thanks for your help. </p> <p>I tried to change this</p> <p><code>add_action(&#39;thematic_content&#39; , &#39;get_the_content_for_the_frikn_slider&#39;);</code></p> <p>to this</p> <p><code>add_action(&#39;thematic_abovepost&#39; , &#39;get_the_content_for_the_frikn_slider&#39;);</code></p> <p>and this</p> <p><code>add_action(&#39;thematic_singlepost&#39; , &#39;get_the_content_for_the_frikn_slider&#39;);</code></p> <p>in all three cases the result is the same. the HTML output looks like this:</p> <pre><code>&lt;div id=&quot;container&quot;&gt; &lt;div id=&quot;content&quot;&gt; &lt;div id=&quot;nav-above&quot; class=&quot;navigation&quot;&gt; &lt;div id=&quot;slides&quot;&gt; &lt;div id=&quot;post-6&quot; class=&quot;post-6 post type-post status-publish format-standard hentry category-allgemein&quot;&gt; &lt;div class=&quot;slides_container&quot; style=&quot;overflow: hidden; position: relative; display: block;&quot;&gt;</code></pre> <p>but the position of the slider is not that important right now. the slilder will not slide. i see the pagination of the slider and the next / prev links - so i guess the jQery-script it doing something but not the desired slidin'. </p> sowingseeds on "jQuery slider above every post-title" http://forums.themeshaper.com/topic/jquery-slider-above-every-post-title#post-24229 Sun, 11 Dec 2011 19:21:15 +0000 sowingseeds 24229@http://forums.themeshaper.com/ <p>Looks as if you have the wrong hook - try 'thematic_abovepost', 'thematic_content' is not a hook. </p> FriedrichS. on "jQuery slider above every post-title" http://forums.themeshaper.com/topic/jquery-slider-above-every-post-title#post-24228 Sun, 11 Dec 2011 18:08:59 +0000 FriedrichS. 24228@http://forums.themeshaper.com/ <p>Hello friends, </p> <p>i am trying to put a jQuery slider (http://slidesjs.com/examples/simple/) just above every post-title i have on any kind of page. </p> <p>It is a very simple slider. I like it, because of my lack of skill and this one is very easy to understand. </p> <p>this is what logic tells me to do: </p> <p>this is what i added to my <code>functions.php</code> in my thematic-child-theme directory:</p> <pre><code>function get_the_content_for_the_frikn_slider(){ get_template_part(&#39;post&#39;,&#39;slides&#39;); } add_action(&#39;thematic_content&#39; , &#39;get_the_content_for_the_frikn_slider&#39;);</code></pre> <p>with this function i get myself the html-markup to be altered by the slider script. it looks like this:</p> <pre><code>&lt;div id=&quot;slides&quot;&gt; &lt;div class=&quot;slides_container&quot;&gt; [div containing a title and a paragraf] [div containing a title and a paragraf] [div containing a title and a paragraf] &lt;/div&gt; &lt;/div&gt;</code></pre> <p>next: enqueue all the scripts</p> <pre><code>function get_the_frikn_slider() { if (!is_admin()) { wp_enqueue_style(&#39;slider-style&#39;, get_bloginfo(&#39;stylesheet_directory&#39;) . &#39;/js/the_frikn_slider/slidescss.css&#39;, false, &#39;1.3.1&#39;); wp_deregister_script(&#39;jquery&#39;); wp_register_script(&#39;jquery&#39;, &#39;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&#39;, false, &#39;1.3.2&#39;, true); wp_enqueue_script(&#39;jquery&#39;); wp_enqueue_script(&#39;my_script&#39;, get_bloginfo(&#39;stylesheet_directory&#39;) . &#39;/js/the_frikn_slider/slides.jquery.js&#39;, array(&#39;jquery&#39;), &#39;1.0&#39;, true); wp_enqueue_script(&#39;my_other_script&#39;, get_bloginfo(&#39;stylesheet_directory&#39;) . &#39;/js/the_frikn_slider/slides.setup.js&#39;, array(&#39;jquery&#39;), &#39;1.0&#39;, true); } } add_action(&#39;init&#39;, &#39;get_the_frikn_slider&#39;);</code></pre> <p>slides.jquery.js: contains the jQuery plugin i mentioned at the beginning.<br /> slides.setup.js: contains the following code:</p> <pre><code>jQuery(function(){ jQuery(&#39;#slides&#39;).slides({ preload: true, generateNextPrev: false }); });</code></pre> <p>slidescss.css: the slider-style</p> <p>The Result is kind of strange: first: The slider will only show above the first post title. Before the second post i see just the contents of <code>post-slides.php</code> (which i got with <code>get_template_part(&#39;post&#39;,&#39;slides&#39;);</code> at the beginning and (more unsettling) second: it does not slide. I see the pagination and the Prev/Next (which are styled correctly by <code>slidescss.css</code>) link but no slidn'.<br /> Ultimately i am trying to use this slider inside of all the post loops (or just the one in single.php for starters) so that things like shot codes an custom field will be available in <code>&lt;div id=&quot;slides&quot;&gt;&lt;div class=&quot;slides_container&quot;&gt;&lt;/div&gt;&lt;/div&gt;</code>.<br /> I guess i am making some kind of embarrassing and obvious mistake. A push in the right direction would be very much appreciated. </p> onelittlemoose on "Parse error!" http://forums.themeshaper.com/topic/parse-error-1#post-24085 Sat, 03 Dec 2011 15:33:14 +0000 onelittlemoose 24085@http://forums.themeshaper.com/ <p>oops, timothyd, I think I gave you bad advice in the beginning. My apologies. Glad it is resolved, though. </p> helgatheviking on "Parse error!" http://forums.themeshaper.com/topic/parse-error-1#post-24083 Sat, 03 Dec 2011 01:08:53 +0000 helgatheviking 24083@http://forums.themeshaper.com/ <p>that is my time-tested debug method. please mark the thread as resolved. </p> timothyd on "Parse error!" http://forums.themeshaper.com/topic/parse-error-1#post-24082 Sat, 03 Dec 2011 00:33:53 +0000 timothyd 24082@http://forums.themeshaper.com/ <p>Thank you for all your help! I think I took the easy way out by simply removing all my child theme files, starting over with the Thematic child theme provided files, and then one by one putting back my templates and functions. Seems to be fine. Although probably have some little things to work out.</p> <p><a href="http://www.timewithtimothy.com" rel="nofollow">www.timewithtimothy.com</a> </p> helgatheviking on "Parse error!" http://forums.themeshaper.com/topic/parse-error-1#post-24081 Sat, 03 Dec 2011 00:22:54 +0000 helgatheviking 24081@http://forums.themeshaper.com/ <p>you only need the backticks to post in the forum to make code easier to read like in my post. it has nothing to do with what goes in your functions.php</p> <p>you are missing a ; at the end of </p> <pre><code>add_action(&#39;thematic_postfooter_postcategory&#39;,&#39;childtheme_postfooter_postcategory&#39;);</code></pre> <p>almost all php lines must end with a ;</p> <p>parse errors mean your code is incorrect and usually means you are missing something such as a ; , ) ?&gt; etc. look closely at the line in question and the lines immediately preceding it. </p>