<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Tag: functions.php</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Sat, 18 May 2013 11:31:54 +0000</pubDate>

<item>
<title>helgatheviking on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26962</link>
<pubDate>Fri, 11 May 2012 03:26:06 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26962@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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 &#34;doing it wrong&#34;... in the sense that it is &#60;em&#62;hard-coding&#60;/em&#62; things into doc-title that seo plugins then have to bludgeon to get out of there.... or can't at all.    &#60;/p&#62;
&#60;p&#62;a better approach might be&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;title&#38;gt;&#38;lt;?php wp_title( &#38;#39;&#124;&#38;#39;, true, &#38;#39;right&#38;#39; ); ?&#38;gt;&#38;lt;/title&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and then filter in the rest via the wp_title filter that lives inside the wp_title function.
&#60;/p&#62;</description>
</item>
<item>
<title>PitaMaria on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26961</link>
<pubDate>Fri, 11 May 2012 03:10:16 +0000</pubDate>
<dc:creator>PitaMaria</dc:creator>
<guid isPermaLink="false">26961@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thanks, gang, for your replies. I was mixing up this issue with another project built on TwentyTen. Re-inserting brain now.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26950</link>
<pubDate>Thu, 10 May 2012 14:12:33 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26950@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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
&#60;/p&#62;</description>
</item>
<item>
<title>tammai on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26946</link>
<pubDate>Thu, 10 May 2012 09:53:02 +0000</pubDate>
<dc:creator>tammai</dc:creator>
<guid isPermaLink="false">26946@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I think you can create new function name childtheme_override_doctitle() in your functions.php then put your code into that.
&#60;/p&#62;</description>
</item>
<item>
<title>PitaMaria on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26930</link>
<pubDate>Thu, 10 May 2012 04:37:48 +0000</pubDate>
<dc:creator>PitaMaria</dc:creator>
<guid isPermaLink="false">26930@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;@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.&#60;/p&#62;
&#60;p&#62;Am I understanding you correctly that I could do something to an extensions file in my child theme? What's that?
&#60;/p&#62;</description>
</item>
<item>
<title>ScottNix on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26922</link>
<pubDate>Thu, 10 May 2012 00:08:29 +0000</pubDate>
<dc:creator>ScottNix</dc:creator>
<guid isPermaLink="false">26922@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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. :/&#60;/p&#62;
&#60;p&#62;There is something else going on here, more to fix than just converting this to a functions.php snippet.
&#60;/p&#62;</description>
</item>
<item>
<title>PitaMaria on "move code from header file to functions.php"</title>
<link>http://themeshaper.com/forums/topic/move-code-from-header-file-to-functionsphp#post-26921</link>
<pubDate>Thu, 10 May 2012 00:03:35 +0000</pubDate>
<dc:creator>PitaMaria</dc:creator>
<guid isPermaLink="false">26921@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Apologies if this topic is covered in this forum; I searched but couldn't find anything relevant.&#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;title&#38;gt;&#38;lt;?php
	/*
	 * Print the &#38;lt;title&#38;gt; tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( &#38;#39;&#124;&#38;#39;, true, &#38;#39;right&#38;#39; );

	// Add the blog name.
	bloginfo( &#38;#39;name&#38;#39; );

	// Add the blog description for the home/front page.
	$site_description = get_bloginfo( &#38;#39;description&#38;#39;, &#38;#39;display&#38;#39; );
	if ( $site_description &#38;#38;&#38;#38; ( is_home() &#124;&#124; is_front_page() ) )
		echo &#38;quot; &#124; $site_description&#38;quot;;

	// Add a page number if necessary:
	if ( $paged &#38;gt;= 2 &#124;&#124; $page &#38;gt;= 2 )
		echo &#38;#39; &#124; &#38;#39; . sprintf( __( &#38;#39;Page %s&#38;#39;, &#38;#39;twentyten&#38;#39; ), max( $paged, $page ) );

	?&#38;gt;&#38;lt;/title&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>ChocHippo on "When is home page home? [child theme]"</title>
<link>http://themeshaper.com/forums/topic/when-is-home-page-home-child-theme#post-25377</link>
<pubDate>Tue, 14 Feb 2012 08:26:35 +0000</pubDate>
<dc:creator>ChocHippo</dc:creator>
<guid isPermaLink="false">25377@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Had the same problem - reading the same book (Sitepoint's &#34;Build Your Own Wicked Wordpress Theme&#34;). 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!!!
&#60;/p&#62;</description>
</item>
<item>
<title>sixfootjames on "CSS3 Pie working on home page but not on other pages"</title>
<link>http://themeshaper.com/forums/topic/css3-pie-working-on-home-page-but-not-on-other-pages#post-25198</link>
<pubDate>Mon, 06 Feb 2012 19:35:40 +0000</pubDate>
<dc:creator>sixfootjames</dc:creator>
<guid isPermaLink="false">25198@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Stuck it in the root and works a charm!&#60;/p&#62;
&#60;p&#62;behavior: url(/PIE.php);&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>sixfootjames on "CSS3 Pie working on home page but not on other pages"</title>
<link>http://themeshaper.com/forums/topic/css3-pie-working-on-home-page-but-not-on-other-pages#post-25197</link>
<pubDate>Mon, 06 Feb 2012 17:04:32 +0000</pubDate>
<dc:creator>sixfootjames</dc:creator>
<guid isPermaLink="false">25197@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Thanks to everyone who's helped me with my first ever full WordPress CMS implementation and Thematic as the framework!&#60;/p&#62;
&#60;p&#62;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?&#60;/p&#62;
&#60;p&#62;Here's the link to my site. &#60;a href=&#34;http://goo.gl/Gc5rB&#34; rel=&#34;nofollow&#34;&#62;http://goo.gl/Gc5rB&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;			function my_render_ie_pie() {&#60;br /&#62;
			echo '&#60;br /&#62;
			&#38;lt;!--[if lte IE 8]&#38;gt;&#60;br /&#62;
			&#38;lt;style type=&#34;text/css&#34; media=&#34;screen&#34;&#38;gt;&#60;br /&#62;
				#branding,&#60;br /&#62;
				#access .menu,&#60;br /&#62;
				#container .home-content .entry-content,&#60;br /&#62;
				#container .home-content .entry-content .homeFeatureLeft a,&#60;br /&#62;
				.featureBlocks,&#60;br /&#62;
				.featureBlocks a,&#60;br /&#62;
				.home-content #slider,&#60;br /&#62;
				#content-left,&#60;br /&#62;
				#content-right,&#60;br /&#62;
				.staffDetail ul.staffProfileMenu,&#60;br /&#62;
				.staffDetail ul.staffProfileMenu  li a,&#60;br /&#62;
				#content-left ul li a,&#60;br /&#62;
				#content-left ul.children  li a&#60;br /&#62;
				{&#60;br /&#62;
					behavior: url(PIE.php);&#60;br /&#62;
				}&#60;br /&#62;
			&#38;lt;/style&#38;gt;&#60;br /&#62;
			&#38;lt;![endif]--&#38;gt;&#60;br /&#62;
			';&#60;br /&#62;
			}&#60;br /&#62;
			add_action('wp_head', 'my_render_ie_pie', 8);&#60;/p&#62;
&#60;p&#62;Many thanks,&#60;br /&#62;
James
&#60;/p&#62;</description>
</item>
<item>
<title>linup on "Changing page-title contents using functions.php"</title>
<link>http://themeshaper.com/forums/topic/changing-page-title-contents-using-functionsphp#post-25091</link>
<pubDate>Mon, 30 Jan 2012 18:09:54 +0000</pubDate>
<dc:creator>linup</dc:creator>
<guid isPermaLink="false">25091@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thanks ScottNix &#38;#38; helgatheviking for the tips!
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Changing page-title contents using functions.php"</title>
<link>http://themeshaper.com/forums/topic/changing-page-title-contents-using-functionsphp#post-25086</link>
<pubDate>Mon, 30 Jan 2012 15:07:33 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">25086@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;some explanation of actions and filters&#60;br /&#62;
&#60;a href=&#34;http://themeshaper.com/forums/topic/need-help-understanding-actions-vs-filters-and-changing-post-meta-and-utility#post-22638&#34; rel=&#34;nofollow&#34;&#62;http://themeshaper.com/forums/topic/need-help-understanding-actions-vs-filters-and-changing-post-meta-and-utility#post-22638&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>ScottNix on "Changing page-title contents using functions.php"</title>
<link>http://themeshaper.com/forums/topic/changing-page-title-contents-using-functionsphp#post-25080</link>
<pubDate>Mon, 30 Jan 2012 07:56:23 +0000</pubDate>
<dc:creator>ScottNix</dc:creator>
<guid isPermaLink="false">25080@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_page_title($content) {
	if (is_category()) {
		$content = &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
		$content .= __(&#38;#39;Custom Text or Remove:&#38;#39;, &#38;#39;thematic&#38;#39;);
		$content .= &#38;#39; &#38;lt;span&#38;gt;&#38;#39;;
		$content .= single_cat_title(&#38;#39;&#38;#39;, FALSE);
		$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39; . &#38;quot;\n&#38;quot;;
		$content .= &#38;#39;&#38;lt;div class=&#38;quot;archive-meta&#38;quot;&#38;gt;&#38;#39;;
		if ( !(&#38;#39;&#38;#39;== category_description()) ) : $content .= apply_filters(&#38;#39;archive_meta&#38;#39;, category_description()); endif;
		$content .= &#38;#39;&#38;lt;/div&#38;gt;&#38;#39;;
	}
	return $content;
}
add_filter(&#38;#39;thematic_page_title&#38;#39;,&#38;#39;childtheme_page_title&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It will now output &#34;Custom Text or Remove:&#34;, you can just remove or change the text there. &#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_override_page_title() {
	global $post;

	$content = &#38;#39;&#38;#39;;
	if (is_attachment()) {
			$content .= &#38;#39;&#38;lt;h2 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;#39;;
			$content .= apply_filters(&#38;#39;the_permalink&#38;#39;,get_permalink($post-&#38;gt;post_parent));
			$content .= &#38;#39;&#38;quot; rev=&#38;quot;attachment&#38;quot;&#38;gt;&#38;lt;span class=&#38;quot;meta-nav&#38;quot;&#38;gt;&#38;amp;laquo; &#38;lt;/span&#38;gt;&#38;#39;;
			$content .= get_the_title($post-&#38;gt;post_parent);
			$content .= &#38;#39;&#38;lt;/a&#38;gt;&#38;lt;/h2&#38;gt;&#38;#39;;
	} elseif (is_author()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title author&#38;quot;&#38;gt;&#38;#39;;
			$author = get_the_author_meta( &#38;#39;display_name&#38;#39; );
			$content .= __(&#38;#39;Author Archives: &#38;#39;, &#38;#39;thematic&#38;#39;);
			$content .= &#38;#39;&#38;lt;span&#38;gt;&#38;#39;;
			$content .= $author;
			$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39;;
	} elseif (is_category()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= __(&#38;#39;Category Archives:&#38;#39;, &#38;#39;thematic&#38;#39;);
			$content .= &#38;#39; &#38;lt;span&#38;gt;&#38;#39;;
			$content .= single_cat_title(&#38;#39;&#38;#39;, FALSE);
			$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39; . &#38;quot;\n&#38;quot;;
			$content .= &#38;#39;&#38;lt;div class=&#38;quot;archive-meta&#38;quot;&#38;gt;&#38;#39;;
			if ( !(&#38;#39;&#38;#39;== category_description()) ) : $content .= apply_filters(&#38;#39;archive_meta&#38;#39;, category_description()); endif;
			$content .= &#38;#39;&#38;lt;/div&#38;gt;&#38;#39;;
	} elseif (is_search()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= __(&#38;#39;Search Results for:&#38;#39;, &#38;#39;thematic&#38;#39;);
			$content .= &#38;#39; &#38;lt;span id=&#38;quot;search-terms&#38;quot;&#38;gt;&#38;#39;;
			$content .= esc_html(stripslashes($_GET[&#38;#39;s&#38;#39;]));
			$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39;;
	} elseif (is_tag()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= __(&#38;#39;Tag Archives:&#38;#39;, &#38;#39;thematic&#38;#39;);
			$content .= &#38;#39; &#38;lt;span&#38;gt;&#38;#39;;
			$content .= __(thematic_tag_query());
			$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39;;
	} elseif (is_tax()) {
			global $taxonomy;
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$tax = get_taxonomy($taxonomy);
			$content .= $tax-&#38;gt;labels-&#38;gt;name . &#38;#39; &#38;#39;;
			$content .= __(&#38;#39;Archives:&#38;#39;, &#38;#39;thematic&#38;#39;);
			$content .= &#38;#39; &#38;lt;span&#38;gt;&#38;#39;;
			$content .= thematic_get_term_name();
			$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39;;
	}	elseif (is_day()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= sprintf(__(&#38;#39;Daily Archives: &#38;lt;span&#38;gt;%s&#38;lt;/span&#38;gt;&#38;#39;, &#38;#39;thematic&#38;#39;), get_the_time(get_option(&#38;#39;date_format&#38;#39;)));
			$content .= &#38;#39;&#38;lt;/h1&#38;gt;&#38;#39;;
	} elseif (is_month()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= sprintf(__(&#38;#39;Monthly Archives: &#38;lt;span&#38;gt;%s&#38;lt;/span&#38;gt;&#38;#39;, &#38;#39;thematic&#38;#39;), get_the_time(&#38;#39;F Y&#38;#39;));
			$content .= &#38;#39;&#38;lt;/h1&#38;gt;&#38;#39;;
	} elseif (is_year()) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= sprintf(__(&#38;#39;Yearly Archives: &#38;lt;span&#38;gt;%s&#38;lt;/span&#38;gt;&#38;#39;, &#38;#39;thematic&#38;#39;), get_the_time(&#38;#39;Y&#38;#39;));
			$content .= &#38;#39;&#38;lt;/h1&#38;gt;&#38;#39;;
	} elseif (isset($_GET[&#38;#39;paged&#38;#39;]) &#38;#38;&#38;#38; !empty($_GET[&#38;#39;paged&#38;#39;])) {
			$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;
			$content .= __(&#38;#39;Blog Archives&#38;#39;, &#38;#39;thematic&#38;#39;);
			$content .= &#38;#39;&#38;lt;/h1&#38;gt;&#38;#39;;
	}
	$content .= &#38;quot;\n&#38;quot;;
	echo apply_filters(&#38;#39;thematic_page_title&#38;#39;, $content);
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>linup on "Changing page-title contents using functions.php"</title>
<link>http://themeshaper.com/forums/topic/changing-page-title-contents-using-functionsphp#post-25079</link>
<pubDate>Mon, 30 Jan 2012 06:36:55 +0000</pubDate>
<dc:creator>linup</dc:creator>
<guid isPermaLink="false">25079@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi there-&#60;br /&#62;
Loving this framework, but am new to any development &#38;#38; need some guidance as to how to change things using filters &#38;#38; action hooks....&#60;br /&#62;
For example, I need to get rid of the words &#34;category archives&#34; on my cat archives pages. These are default in the &#34;page-title.&#34;&#60;br /&#62;
I found the related code in content-extensions.php file (library &#38;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.&#60;br /&#62;
Would someone be so kind as to walk me through this?&#60;br /&#62;
Thanks in advance... and thanks for this time-saving gem of a theme!&#60;br /&#62;
Lindsay&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;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(&#38;#39;childtheme_override_page_title&#38;#39;))  {

	function thematic_page_title() {

		childtheme_override_page_title();

	}

} elseif (is_category()) {

				$content .= &#38;#39;&#38;lt;h1 class=&#38;quot;page-title&#38;quot;&#38;gt;&#38;#39;;

				$content .= __(&#38;#39;Category Archives:&#38;#39;, &#38;#39;thematic&#38;#39;);

				$content .= &#38;#39; &#38;lt;span&#38;gt;&#38;#39;;

				$content .= single_cat_title(&#38;#39;&#38;#39;, FALSE);

				$content .= &#38;#39;&#38;lt;/span&#38;gt;&#38;lt;/h1&#38;gt;&#38;#39; . &#38;quot;\n&#38;quot;;

				$content .= &#38;#39;&#38;lt;div class=&#38;quot;archive-meta&#38;quot;&#38;gt;&#38;#39;;

				if ( !(&#38;#39;&#38;#39;== category_description()) ) : $content .= apply_filters(&#38;#39;archive_meta&#38;#39;, category_description()); endif;

				$content .= &#38;#39;&#38;lt;/div&#38;gt;&#38;#39;;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>helgatheviking on "location of "indexloop""</title>
<link>http://themeshaper.com/forums/topic/location-of-indexloop#post-24841</link>
<pubDate>Thu, 12 Jan 2012 19:20:39 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24841@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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.  &#60;/p&#62;
&#60;p&#62;oh  hai there.... you'll find :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// The Index Loop
if (function_exists(&#38;#39;childtheme_override_index_loop&#38;#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[&#38;#39;id&#38;#39;] ) === FALSE) {
		        $$value[&#38;#39;id&#38;#39;] = $value[&#38;#39;std&#38;#39;];
		    } else {
		    	if (THEMATIC_MB)
		    	{
		        	$$value[&#38;#39;id&#38;#39;] = get_option($blog_id,  $value[&#38;#39;id&#38;#39;] );
		    	}
		    	else
		    	{
		        	$$value[&#38;#39;id&#38;#39;] = get_option( $value[&#38;#39;id&#38;#39;] );
		    	}
		    }
		}

		/* Count the number of posts so we can insert a widgetized area */ $count = 1;
		while ( have_posts() ) : the_post();

				thematic_abovepost(); ?&#38;gt;

				&#38;lt;div id=&#38;quot;post-&#38;lt;?php the_ID();
					echo &#38;#39;&#38;quot; &#38;#39;;
					if (!(THEMATIC_COMPATIBLE_POST_CLASS)) {
						post_class();
						echo &#38;#39;&#38;gt;&#38;#39;;
					} else {
						echo &#38;#39;class=&#38;quot;&#38;#39;;
						thematic_post_class();
						echo &#38;#39;&#38;quot;&#38;gt;&#38;#39;;
					}
     				thematic_postheader(); ?&#38;gt;
					&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;
&#38;lt;?php thematic_content(); ?&#38;gt;

					&#38;lt;?php wp_link_pages(&#38;#39;before=&#38;lt;div class=&#38;quot;page-link&#38;quot;&#38;gt;&#38;#39; .__(&#38;#39;Pages:&#38;#39;, &#38;#39;thematic&#38;#39;) . &#38;#39;&#38;#38;after=&#38;lt;/div&#38;gt;&#38;#39;) ?&#38;gt;
					&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-content --&#38;gt;
					&#38;lt;?php thematic_postfooter(); ?&#38;gt;
				&#38;lt;/div&#38;gt;&#38;lt;!-- #post --&#38;gt;

			&#38;lt;?php 

				thematic_belowpost();

				comments_template();

				if ($count==$thm_insert_position) {
						get_sidebar(&#38;#39;index-insert&#38;#39;);
				}
				$count = $count + 1;
		endwhile;
	}
} // end index_loop

add_action(&#38;#39;thematic_indexloop&#38;#39;, &#38;#39;thematic_index_loop&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;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.
&#60;/p&#62;</description>
</item>
<item>
<title>alxvallejo on "location of "indexloop""</title>
<link>http://themeshaper.com/forums/topic/location-of-indexloop#post-24840</link>
<pubDate>Thu, 12 Jan 2012 19:02:37 +0000</pubDate>
<dc:creator>alxvallejo</dc:creator>
<guid isPermaLink="false">24840@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I know this is an ancient post so forgive me:&#60;/p&#62;
&#60;p&#62;The function for the index loop is:&#60;/p&#62;
&#60;p&#62;function thematic_indexloop() {&#60;br /&#62;
do_action('thematic_indexloop');&#60;br /&#62;
} // end thematic_indexloop&#60;/p&#62;
&#60;p&#62;To me, this looks like a dead end. How can I alter the behavior in my own child theme?
&#60;/p&#62;</description>
</item>
<item>
<title>cookieandkate on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24757</link>
<pubDate>Mon, 09 Jan 2012 13:35:54 +0000</pubDate>
<dc:creator>cookieandkate</dc:creator>
<guid isPermaLink="false">24757@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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.
&#60;/p&#62;</description>
</item>
<item>
<title>proto on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24753</link>
<pubDate>Mon, 09 Jan 2012 10:07:29 +0000</pubDate>
<dc:creator>proto</dc:creator>
<guid isPermaLink="false">24753@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Isn't Helga brilliant! &#60;/p&#62;
&#60;p&#62;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! &#60;/p&#62;
&#60;p&#62;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 &#34;functions.php&#34; 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. &#60;/p&#62;
&#60;p&#62;Any errors may be because you might have been because the code I gave you was added somewhere else other than your child theme &#34;functions.php&#34; 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 :)
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24752</link>
<pubDate>Mon, 09 Jan 2012 07:31:48 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24752@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;you got it... now just remember that add stuff to any hook works the same way and with great power comes great responsibility! :)
&#60;/p&#62;</description>
</item>
<item>
<title>cookieandkate on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24750</link>
<pubDate>Mon, 09 Jan 2012 05:13:47 +0000</pubDate>
<dc:creator>cookieandkate</dc:creator>
<guid isPermaLink="false">24750@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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 &#38;lt;head&#38;gt; section. Here it is:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// CODENAME code goes before end body tag

function CODENAME_code_beforeendbody() { ?&#38;gt;

CODE GOES HERE

    &#38;lt;?php }

add_action (&#38;#39;thematic_after&#38;#39;, &#38;#39;CODENAME_code_beforeendbody&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;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 &#38;lt;/body&#38;gt; tag.
&#60;/p&#62;</description>
</item>
<item>
<title>proto on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24700</link>
<pubDate>Fri, 06 Jan 2012 14:51:20 +0000</pubDate>
<dc:creator>proto</dc:creator>
<guid isPermaLink="false">24700@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello cookieandkate,&#60;/p&#62;
&#60;p&#62;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!)&#60;/p&#62;
&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;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 &#34;thematic_after;&#34;&#60;/p&#62;
&#60;p&#62;So your code might look like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Action hook for placing code before end body tag

function webmagic_code_beforeendbody() {
	echo(&#38;#39;INSERT YOUR CODE SNIPPET HERE&#38;#39;) ;}

add_action (&#38;#39;thematic_after&#38;#39;, &#38;#39;webmagic_code_beforeendbody&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The &#34;webmagic_code_beforeendbody&#34; 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.&#60;/p&#62;
&#60;p&#62;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 &#34;footer.php&#34; and other files, you'll see them there.&#60;/p&#62;
&#60;p&#62;**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.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24698</link>
<pubDate>Fri, 06 Jan 2012 14:42:30 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24698@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;the same way you add anything to any hook.  &#60;/p&#62;
&#60;p&#62;look at &#60;a href=&#34;http://visualizing.thematic4you.com&#34; rel=&#34;nofollow&#34;&#62;http://visualizing.thematic4you.com&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;and you will see that thematic has a hook exactly where you are asking: thematic_after();
&#60;/p&#62;</description>
</item>
<item>
<title>cookieandkate on "how to add code before &#60;/body&#62;"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-code-before-ltbodygt#post-24694</link>
<pubDate>Fri, 06 Jan 2012 05:50:29 +0000</pubDate>
<dc:creator>cookieandkate</dc:creator>
<guid isPermaLink="false">24694@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello, I need to insert a snippet of code right before the &#38;lt;/body&#38;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 &#38;lt;/body&#38;gt; tag?&#60;/p&#62;
&#60;p&#62;Thank you so much for your help!&#60;br /&#62;
Kate
&#60;/p&#62;</description>
</item>
<item>
<title>FriedrichS. on "jQuery slider above every post-title"</title>
<link>http://themeshaper.com/forums/topic/jquery-slider-above-every-post-title#post-24232</link>
<pubDate>Sun, 11 Dec 2011 21:33:32 +0000</pubDate>
<dc:creator>FriedrichS.</dc:creator>
<guid isPermaLink="false">24232@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi, thanks for your help.  &#60;/p&#62;
&#60;p&#62;I tried to change this&#60;/p&#62;
&#60;p&#62;&#60;code&#62;add_action(&#38;#39;thematic_content&#38;#39; , &#38;#39;get_the_content_for_the_frikn_slider&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;to this&#60;/p&#62;
&#60;p&#62;&#60;code&#62;add_action(&#38;#39;thematic_abovepost&#38;#39; , &#38;#39;get_the_content_for_the_frikn_slider&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and this&#60;/p&#62;
&#60;p&#62;&#60;code&#62;add_action(&#38;#39;thematic_singlepost&#38;#39; , &#38;#39;get_the_content_for_the_frikn_slider&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;in all three cases the result is the same. the HTML output looks like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;div id=&#38;quot;container&#38;quot;&#38;gt;
  &#38;lt;div id=&#38;quot;content&#38;quot;&#38;gt;
    &#38;lt;div id=&#38;quot;nav-above&#38;quot; class=&#38;quot;navigation&#38;quot;&#38;gt;
      &#38;lt;div id=&#38;quot;slides&#38;quot;&#38;gt;
        &#38;lt;div id=&#38;quot;post-6&#38;quot; class=&#38;quot;post-6 post type-post status-publish format-standard hentry category-allgemein&#38;quot;&#38;gt;
          &#38;lt;div class=&#38;quot;slides_container&#38;quot; style=&#38;quot;overflow: hidden; position: relative; display: block;&#38;quot;&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;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'.
&#60;/p&#62;</description>
</item>
<item>
<title>sowingseeds on "jQuery slider above every post-title"</title>
<link>http://themeshaper.com/forums/topic/jquery-slider-above-every-post-title#post-24229</link>
<pubDate>Sun, 11 Dec 2011 19:21:15 +0000</pubDate>
<dc:creator>sowingseeds</dc:creator>
<guid isPermaLink="false">24229@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Looks as if you have the wrong hook - try 'thematic_abovepost', 'thematic_content' is not a hook.
&#60;/p&#62;</description>
</item>
<item>
<title>FriedrichS. on "jQuery slider above every post-title"</title>
<link>http://themeshaper.com/forums/topic/jquery-slider-above-every-post-title#post-24228</link>
<pubDate>Sun, 11 Dec 2011 18:08:59 +0000</pubDate>
<dc:creator>FriedrichS.</dc:creator>
<guid isPermaLink="false">24228@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello friends, &#60;/p&#62;
&#60;p&#62;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. &#60;/p&#62;
&#60;p&#62;It is a very simple slider. I like it, because of my lack of skill and this one is very easy to understand. &#60;/p&#62;
&#60;p&#62;this is what logic tells me to do: &#60;/p&#62;
&#60;p&#62;this is what i added to my &#60;code&#62;functions.php&#60;/code&#62; in my thematic-child-theme directory:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function get_the_content_for_the_frikn_slider(){
	get_template_part(&#38;#39;post&#38;#39;,&#38;#39;slides&#38;#39;);
}
add_action(&#38;#39;thematic_content&#38;#39; , &#38;#39;get_the_content_for_the_frikn_slider&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;with this function i get myself the html-markup to be altered by the slider script. it looks like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;div id=&#38;quot;slides&#38;quot;&#38;gt;
	&#38;lt;div class=&#38;quot;slides_container&#38;quot;&#38;gt;
		[div containing a title and a paragraf]
		[div containing a title and a paragraf]
		[div containing a title and a paragraf]
	&#38;lt;/div&#38;gt;
&#38;lt;/div&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;next: enqueue all the scripts&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function get_the_frikn_slider() {
	if (!is_admin()) {
		wp_enqueue_style(&#38;#39;slider-style&#38;#39;, get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;) . &#38;#39;/js/the_frikn_slider/slidescss.css&#38;#39;, false, &#38;#39;1.3.1&#38;#39;);

		wp_deregister_script(&#38;#39;jquery&#38;#39;);
		wp_register_script(&#38;#39;jquery&#38;#39;, &#38;#39;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&#38;#39;, false, &#38;#39;1.3.2&#38;#39;, true);
		wp_enqueue_script(&#38;#39;jquery&#38;#39;);

		wp_enqueue_script(&#38;#39;my_script&#38;#39;, get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;) . &#38;#39;/js/the_frikn_slider/slides.jquery.js&#38;#39;, array(&#38;#39;jquery&#38;#39;), &#38;#39;1.0&#38;#39;, true);
		wp_enqueue_script(&#38;#39;my_other_script&#38;#39;, get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;) . &#38;#39;/js/the_frikn_slider/slides.setup.js&#38;#39;, array(&#38;#39;jquery&#38;#39;), &#38;#39;1.0&#38;#39;, true);

	}
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;get_the_frikn_slider&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;slides.jquery.js: contains the jQuery plugin i mentioned at the beginning.&#60;br /&#62;
slides.setup.js: contains the following code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;jQuery(function(){
	jQuery(&#38;#39;#slides&#38;#39;).slides({
		preload: true,
		generateNextPrev: false
	});
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;slidescss.css: the slider-style&#60;/p&#62;
&#60;p&#62;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 &#60;code&#62;post-slides.php&#60;/code&#62; (which i got with &#60;code&#62;get_template_part(&#38;#39;post&#38;#39;,&#38;#39;slides&#38;#39;);&#60;/code&#62; at the beginning and (more unsettling) second: it does not slide. I see the pagination and the Prev/Next (which are styled correctly by &#60;code&#62;slidescss.css&#60;/code&#62;) link but no slidn'.&#60;br /&#62;
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 &#60;code&#62;&#38;lt;div id=&#38;quot;slides&#38;quot;&#38;gt;&#38;lt;div class=&#38;quot;slides_container&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;&#38;lt;/div&#38;gt;&#60;/code&#62;.&#60;br /&#62;
I guess i am making some kind of embarrassing and obvious mistake. A push in the right direction would be very much appreciated.
&#60;/p&#62;</description>
</item>
<item>
<title>onelittlemoose on "Parse error!"</title>
<link>http://themeshaper.com/forums/topic/parse-error-1#post-24085</link>
<pubDate>Sat, 03 Dec 2011 15:33:14 +0000</pubDate>
<dc:creator>onelittlemoose</dc:creator>
<guid isPermaLink="false">24085@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;oops, timothyd, I think I gave you bad advice in the beginning. My apologies. Glad it is resolved, though.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Parse error!"</title>
<link>http://themeshaper.com/forums/topic/parse-error-1#post-24083</link>
<pubDate>Sat, 03 Dec 2011 01:08:53 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24083@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;that is my time-tested debug method.  please mark the thread as resolved.
&#60;/p&#62;</description>
</item>
<item>
<title>timothyd on "Parse error!"</title>
<link>http://themeshaper.com/forums/topic/parse-error-1#post-24082</link>
<pubDate>Sat, 03 Dec 2011 00:33:53 +0000</pubDate>
<dc:creator>timothyd</dc:creator>
<guid isPermaLink="false">24082@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.timewithtimothy.com&#34; rel=&#34;nofollow&#34;&#62;www.timewithtimothy.com&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Parse error!"</title>
<link>http://themeshaper.com/forums/topic/parse-error-1#post-24081</link>
<pubDate>Sat, 03 Dec 2011 00:22:54 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">24081@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;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&#60;/p&#62;
&#60;p&#62;you are missing a ; at the end of &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;thematic_postfooter_postcategory&#38;#39;,&#38;#39;childtheme_postfooter_postcategory&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;almost all php lines must end with a ;&#60;/p&#62;
&#60;p&#62;parse errors mean your code is incorrect and usually means you are missing something such as a ; , ) ?&#38;gt; etc.  look closely at the line in question and the lines immediately preceding it.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
