<?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: loop</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Tue, 21 May 2013 15:46:35 +0000</pubDate>

<item>
<title>em hr on "posts_where problem"</title>
<link>http://themeshaper.com/forums/topic/posts_where-problem#post-27731</link>
<pubDate>Sat, 15 Dec 2012 17:56:47 +0000</pubDate>
<dc:creator>em hr</dc:creator>
<guid isPermaLink="false">27731@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Please &#60;a href=&#34;http://themeshaper.com/forums/topic/please-read-this-before-adding-new-topics-thematic-has-moved&#34;&#62; read this&#60;/a&#62; and come to then new &#60;a href=&#34;http://thematictheme.com/forums/&#34;&#62;ThematicTheme Forums&#60;/a&#62; for support.
&#60;/p&#62;</description>
</item>
<item>
<title>iCristiano on "posts_where problem"</title>
<link>http://themeshaper.com/forums/topic/posts_where-problem#post-27668</link>
<pubDate>Tue, 06 Nov 2012 22:23:41 +0000</pubDate>
<dc:creator>iCristiano</dc:creator>
<guid isPermaLink="false">27668@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi Thematic friends,&#60;/p&#62;
&#60;p&#62;I have a taxonomy called &#34;genero&#34;. I´m trying to limit my &#34;genero&#34; archive page to just show future posts, like an event page.&#60;/p&#62;
&#60;p&#62;So, I used this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function filter_where( $where ) {
	if(is_tax(&#38;#39;genero&#38;#39;)){
		$where .= &#38;quot; AND post_date &#38;gt; &#38;#39;&#38;quot; . date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;0 days&#38;#39;)) . &#38;quot;&#38;#39;&#38;quot;;
	}
	return $where;
}
add_filter( &#38;#39;posts_where&#38;#39;, &#38;#39;filter_where&#38;#39; );

function reset_filter_where() {
	if(is_tax(&#38;#39;genero&#38;#39;)){
		remove_filter( &#38;#39;posts_where&#38;#39;, &#38;#39;filter_where&#38;#39; );
	}
}
add_action(&#38;#39;thematic_below_archiveloop&#38;#39;,&#38;#39;reset_filter_where&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It works great on the genero´s archive page, but it breaks all the other looping on other pages. I don´t know what is happening. When I say it breaks I mean I get a blank page in another archive page, for exemple! On home, where I have another 2 loops, it shows the page, the header, but the loops are empty.&#60;/p&#62;
&#60;p&#62;Any help?&#60;br /&#62;
Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>Jagst3r15 on "Excerpt on front page -- "childtheme_override_content_init()" never called?"</title>
<link>http://themeshaper.com/forums/topic/excerpt-on-front-page-childtheme_override_content_init-never-called#post-27187</link>
<pubDate>Mon, 28 May 2012 05:44:24 +0000</pubDate>
<dc:creator>Jagst3r15</dc:creator>
<guid isPermaLink="false">27187@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;should have read more, i think 0.9.8 fixes that...soooo close to 1.0 though it might not even be worth using (unless it gets rejected lol).
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Excerpt on front page -- "childtheme_override_content_init()" never called?"</title>
<link>http://themeshaper.com/forums/topic/excerpt-on-front-page-childtheme_override_content_init-never-called#post-27186</link>
<pubDate>Mon, 28 May 2012 05:16:50 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">27186@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;0.9.8 is the version i've been supporting which was available at:&#60;br /&#62;
developing.thematic4you.com/thematic-development-release/&#60;/p&#62;
&#60;p&#62;admittedly a bit of a cluster$*&#38;amp;# that we had such an outdated version in the repo, but 1.0 is in the theme review queue....  (finally!)
&#60;/p&#62;</description>
</item>
<item>
<title>Jagst3r15 on "Excerpt on front page -- "childtheme_override_content_init()" never called?"</title>
<link>http://themeshaper.com/forums/topic/excerpt-on-front-page-childtheme_override_content_init-never-called#post-27183</link>
<pubDate>Mon, 28 May 2012 04:16:27 +0000</pubDate>
<dc:creator>Jagst3r15</dc:creator>
<guid isPermaLink="false">27183@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;he is talking about thematic 1.0, which is in the process of being reviewed for approval in the wordpress.org repo. I uploaded it here for you - it is essentially stable so you can use it safely &#60;a href=&#34;http://seamlessthemes.com/resources/&#34; rel=&#34;nofollow&#34;&#62;http://seamlessthemes.com/resources/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>derpayatz on "Excerpt on front page -- "childtheme_override_content_init()" never called?"</title>
<link>http://themeshaper.com/forums/topic/excerpt-on-front-page-childtheme_override_content_init-never-called#post-27182</link>
<pubDate>Mon, 28 May 2012 04:12:30 +0000</pubDate>
<dc:creator>derpayatz</dc:creator>
<guid isPermaLink="false">27182@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi, I've got the 0.9.7.7 Thematic from the wordpress.org website, and the add_action is still inside the elseif.
&#60;/p&#62;</description>
</item>
<item>
<title>bobbysoren on "Insert anything between posts in homepage"</title>
<link>http://themeshaper.com/forums/topic/insert-anything-between-posts-in-homepage#post-27114</link>
<pubDate>Thu, 24 May 2012 17:00:14 +0000</pubDate>
<dc:creator>bobbysoren</dc:creator>
<guid isPermaLink="false">27114@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey! Everybody. Thanks for reading me out. This is the problem I've been going through.&#60;/p&#62;
&#60;p&#62;I want to show anything between any specific number of posts on the homepage. &#60;/p&#62;
&#60;p&#62;Example :&#60;br /&#62;
&#60;a href=&#34;http://fashionista.com/&#34; rel=&#34;nofollow&#34;&#62;http://fashionista.com/&#60;/a&#62; &#60;/p&#62;
&#60;p&#62;Look between the 1st and 2nd post of the main index loop, it has subscription form. So I want to put anything like ads and stuff into that area.&#60;/p&#62;
&#60;p&#62;-Bobby
&#60;/p&#62;</description>
</item>
<item>
<title>fwunder on "How are you using Thematic?"</title>
<link>http://themeshaper.com/forums/topic/how-are-you-using-thematic/page/9#post-27113</link>
<pubDate>Thu, 24 May 2012 13:52:46 +0000</pubDate>
<dc:creator>fwunder</dc:creator>
<guid isPermaLink="false">27113@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ye olde eclectic antique shop. A fun Thematic diversion:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.rollingriverantiques.com/&#34; rel=&#34;nofollow&#34;&#62;http://www.rollingriverantiques.com/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;-fred
&#60;/p&#62;</description>
</item>
<item>
<title>sfrangos on "How are you using Thematic?"</title>
<link>http://themeshaper.com/forums/topic/how-are-you-using-thematic/page/9#post-27106</link>
<pubDate>Thu, 24 May 2012 00:30:02 +0000</pubDate>
<dc:creator>sfrangos</dc:creator>
<guid isPermaLink="false">27106@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi All -&#60;/p&#62;
&#60;p&#62;Love seeing your work here.  We just finished these sites based on thematic child themes:&#60;/p&#62;
&#60;p&#62;* Our new Agency site:  &#60;a href=&#34;http://Webdirexion.com&#34; rel=&#34;nofollow&#34;&#62;http://Webdirexion.com&#60;/a&#62;&#60;br /&#62;
* A site for an HVAC company:  &#60;a href=&#34;http://ainsworthac.com/&#34; rel=&#34;nofollow&#34;&#62;http://ainsworthac.com/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;We will be adding some of the sites you post here (and at the new home for Thematic as it celebrates version 1.0 release) in the Thematic showcase here:  &#60;a href=&#34;http://thematicmondo.com/directory/site-showcase/&#34; rel=&#34;nofollow&#34;&#62;http://thematicmondo.com/directory/site-showcase/&#60;/a&#62;  (Webdirexion runs this companion Thematic site as a way to thank and feature the community and their good work with Thematic).&#60;/p&#62;
&#60;p&#62;- Scott&#60;br /&#62;
&#60;a href=&#34;http://webdirexion.com&#34; rel=&#34;nofollow&#34;&#62;http://webdirexion.com&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>siguy on "How are you using Thematic?"</title>
<link>http://themeshaper.com/forums/topic/how-are-you-using-thematic/page/9#post-27055</link>
<pubDate>Fri, 18 May 2012 21:41:48 +0000</pubDate>
<dc:creator>siguy</dc:creator>
<guid isPermaLink="false">27055@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;It's done! (and moved to &#60;a href=&#34;http://zennkai.com&#34;&#62;zennkai.com&#60;/a&#62;)&#60;/p&#62;
&#60;p&#62;Along with the images that are inserted at thematic_abovecontent I am now also using a function to add some social media feeds that show next to the image on the home page and next to the content on the blog page.&#60;/p&#62;
&#60;p&#62;I played around with using an if statement to only show the block of feeds on the home and blog page but I guess I'm not familiar enough with WPs functions and failed at that so I simply insert them on each page load with display:none in the div's style attribute and override where I want them to actually show.&#60;/p&#62;
&#60;p&#62;It was done this way mainly because I had the social feeds working on just the home page without issue but I was asked very late into the project to add them to the blog page and I just did not have the time to do it properly at that point.&#60;/p&#62;
&#60;p&#62;If anybody want's more information or would like to see my ugly code, I would love to share more info :)
&#60;/p&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26695</link>
<pubDate>Sat, 28 Apr 2012 14:05:13 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26695@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ahh, that old chestnut...
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26693</link>
<pubDate>Sat, 28 Apr 2012 13:52:41 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26693@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;no bacon is very unsatisfactory.  always more than 1 way to skin the cat b/c we could probably go back to what you started with&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function remove_thematic_categoryloop() {
	remove_action(&#38;#39;thematic_categoryloop&#38;#39;, &#38;#39;thematic_category_loop&#38;#39;);
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;remove_thematic_categoryloop&#38;#39;);

function kia_categoy_loop(){
   if(is_category(&#38;#39;bacon&#38;#39;)){
       //bacon loop here
   } else {
       thematic_category_loop();
   }
add_action(&#38;#39;thematic_categoryloop&#38;#39;,&#38;#39;kia_category_loop&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26692</link>
<pubDate>Sat, 28 Apr 2012 10:26:38 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26692@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ah, yes. That's better. I figured there must've been a walking donut there. That loop had completely disappeared up it's own rear. And it didn't have ANY bacon in it, which is, well, unsatisfactory.&#60;/p&#62;
&#60;p&#62;As ever, Helga, thank you. You're awesome. :)
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26655</link>
<pubDate>Thu, 26 Apr 2012 01:50:56 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26655@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;not bacon!  :)  well i have to apologize b/c i think i messed up.  &#60;/p&#62;
&#60;p&#62;basically thematic does this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (function_exists(&#38;#39;childtheme_override_category_loop&#38;#39;))  {
	function thematic_category_loop() {
		childtheme_override_category_loop();
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;so if the override is defined then thematic's default becomes the override.  which means the original thematic_category_loop doesn't exist anymore and you just end up in a loop of loops.  &#60;/p&#62;
&#60;p&#62;my else statement&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;else { thematic_category_loop() }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;is just pointing to childtheme_override_category_loop which points to thematic_category_loop and on and on.  &#60;/p&#62;
&#60;p&#62;so the override should be&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_override_category_loop(){
  if(is_category(&#38;#39;bacon&#38;#39;)){
       //put your special bacon loop here
  } else {
      //put default category loop here
  }
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26653</link>
<pubDate>Wed, 25 Apr 2012 23:04:04 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26653@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Yeah I'm using 0.9.8, but no joy. Ah well, the less streamlined version is working OK. It just bugs me that something that *should* work, doesn't. It's just not bacon.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26629</link>
<pubDate>Wed, 25 Apr 2012 13:26:49 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26629@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;can't see anything in your code, but first off make sure you are using this version of thematic:&#60;br /&#62;
developing.thematic4you.com/thematic-development-release/&#60;/p&#62;
&#60;p&#62;as there were some problems w/ the add_action that got resolved.
&#60;/p&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26621</link>
<pubDate>Wed, 25 Apr 2012 05:17:41 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26621@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;OK... so I've been working with Helga's cleaner code. But, It's not playing nicely with me. I find that the two loops I have defined in it work fine. But then the normal thematic_category_loop doesn't seem to work. The categories that should run that loop don't seem to run any loop at all. So, it made me wonder, doesn't specifying childtheme_override_category_loop tell the original thematic_category_loop to go use childtheme_override_category_loop instead? Therefore, flying up it's own backside? Maybe it doesn't work that way. But it was the best explanation I could come up with to explain why the code below didn't work. Can you spot anything that looks like it would prevent the thematic_category_loop from working?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// remove the standard loop

function childtheme_override_category_loop(){

// get the name of the category and store it in the variable $catslug
  $cat = get_query_var(&#38;#39;cat&#38;#39;);
  $yourcat = get_category ($cat);
  $catslug = $yourcat-&#38;gt;slug;

if (is_category(&#38;#39;testimonials&#38;#39;)){
 query_posts(&#38;#39;category_name=&#38;#39;.$catslug);
 if (have_posts()) : while (have_posts()) : the_post();  ?&#38;gt;

&#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/h1&#38;gt;
&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;&#38;lt;?php the_content(); ?&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;?php endwhile; endif;
}
elseif (is_category(&#38;#39;menus&#38;#39;)) {
// loop for the content within the current category,
// which has a custom field &#38;#39;intro_article&#38;#39; which is equal to 1
$handmade_query = new WP_Query(&#38;#39;category_name=&#38;#39;.$catslug.&#38;#39;&#38;#38;meta_key=intro_article&#38;#38;meta_value=1&#38;#39;);
while ($handmade_query-&#38;gt;have_posts()) : $handmade_query-&#38;gt;the_post();  ?&#38;gt;

&#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/h1&#38;gt;
&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;&#38;lt;?php the_content(); ?&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;?php endwhile;
wp_reset_postdata(); ?&#38;gt;

&#38;lt;?php
// now loop to create an unordered list of the other posts in the category
// but which have a custom field &#38;#39;intro_article&#38;#39; which is equal to 0
?&#38;gt;
&#38;lt;ul id=&#38;quot;sub-nav-ul&#38;quot;&#38;gt;
&#38;lt;?php
 query_posts(&#38;#39;category_name=&#38;#39;.$catslug.&#38;#39;&#38;#38;meta_key=intro_article&#38;#38;meta_value=0&#38;#39;);
 if (have_posts()) : while (have_posts()) : the_post();  ?&#38;gt;

 &#38;lt;li id=&#38;quot;sub-nav&#38;quot; class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ?&#38;gt;&#38;quot; rel=&#38;quot;bookmark&#38;quot; title=&#38;quot;Permanent Link to &#38;lt;?php the_title_attribute(); ?&#38;gt;&#38;quot;&#38;gt; &#38;lt;?php the_post_thumbnail(array(70,70));?&#38;gt;&#38;lt;span&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;

&#38;lt;?php endwhile; endif; ?&#38;gt;&#38;lt;/ul&#38;gt; &#38;lt;?php
wp_reset_postdata();

} else {
      thematic_category_loop();
  }
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26620</link>
<pubDate>Wed, 25 Apr 2012 04:58:26 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26620@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Cool beans. Thanks Helga!
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26617</link>
<pubDate>Wed, 25 Apr 2012 03:46:28 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26617@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;you got it.  everything is better with bacon.  yes, look through the extensions folder.  you'll see plenty of places where it is set up to run childtheme_override_whatever in place of thematic_whatever.  the overrides are far more intuitive than filters, but not always the best solution.  usually depends on how much you need to change... or if there is a filter available.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26618</link>
<pubDate>Wed, 25 Apr 2012 03:46:28 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26618@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;you got it.  everything is better with bacon.  yes, look through the extensions folder.  you'll see plenty of places where it is set up to run childtheme_override_whatever in place of thematic_whatever.  the overrides are far more intuitive than filters, but not always the best solution.  usually depends on how much you need to change... or if there is a filter available.
&#60;/p&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26613</link>
<pubDate>Wed, 25 Apr 2012 00:30:47 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26613@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Well, clearly that's much more elegant. And anything that has bacon in it has to be good, right?&#60;/p&#62;
&#60;p&#62;So, the function childtheme_override_whateverfunction. That can be used to? Let me guess, override any function you can find that says thematic_whateverfunction?
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26598</link>
<pubDate>Tue, 24 Apr 2012 15:02:52 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26598@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;as a general set up what about:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_override_category_loop(){
  if(is_category(&#38;#39;bacon&#38;#39;)){
       //put your special bacon loop here
  } else {
      thematic_category_loop();
  }
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26595</link>
<pubDate>Tue, 24 Apr 2012 12:48:02 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26595@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;OK... I think I have it. Just in case someone else may find this helpful I'm pasting the code below.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// remove the standard loop

function remove_thematic_categoryloop() {
	remove_action(&#38;#39;thematic_categoryloop&#38;#39;, &#38;#39;thematic_category_loop&#38;#39;);
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;remove_thematic_categoryloop&#38;#39;);

// get the name of the category and store it in the variable $catslug
function add_handmade_intro_categoryloop() {
if (is_category( )) {
  $cat = get_query_var(&#38;#39;cat&#38;#39;);
  $yourcat = get_category ($cat);
  $catslug = $yourcat-&#38;gt;slug;

// if this isn&#38;#39;t in the menus category, do a normal loop
if (!is_category(&#38;#39;menus&#38;#39;)){
 query_posts(&#38;#39;category_name=&#38;#39;.$catslug);
 if (have_posts()) : while (have_posts()) : the_post();  ?&#38;gt;

 &#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/h1&#38;gt;
&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;&#38;lt;?php the_content(); ?&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;?php endwhile; endif;
wp_reset_postdata();
}

// if it is in the category &#38;#39;menus&#38;#39; then do these special loops
if (is_category(&#38;#39;menus&#38;#39;)) {

// loop for the content within the current category,
// which has a custom field &#38;#39;intro_article&#38;#39; which is equal to 1
$handmade_query = new WP_Query(&#38;#39;category_name=&#38;#39;.$catslug.&#38;#39;&#38;#38;meta_key=intro_article&#38;#38;meta_value=1&#38;#39;);
while ($handmade_query-&#38;gt;have_posts()) : $handmade_query-&#38;gt;the_post();  ?&#38;gt;

&#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/h1&#38;gt;
&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;&#38;lt;?php the_content(); ?&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;?php endwhile;
wp_reset_postdata(); ?&#38;gt;

&#38;lt;?php
// now loop to create an unordered list of the other posts in the category
// but which have a custom field &#38;#39;intro_article&#38;#39; which is equal to 0
?&#38;gt;
&#38;lt;ul id=&#38;quot;sub-nav-ul&#38;quot;&#38;gt;
&#38;lt;?php
 query_posts(&#38;#39;category_name=&#38;#39;.$catslug.&#38;#39;&#38;#38;meta_key=intro_article&#38;#38;meta_value=0&#38;#39;);
 if (have_posts()) : while (have_posts()) : the_post();  ?&#38;gt;

 &#38;lt;li id=&#38;quot;sub-nav&#38;quot; class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ?&#38;gt;&#38;quot; rel=&#38;quot;bookmark&#38;quot; title=&#38;quot;Permanent Link to &#38;lt;?php the_title_attribute(); ?&#38;gt;&#38;quot;&#38;gt; &#38;lt;?php the_post_thumbnail(array(70,70));?&#38;gt;&#38;lt;span&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;

&#38;lt;?php endwhile; endif; ?&#38;gt;&#38;lt;/ul&#38;gt; &#38;lt;?php
}
}
}
add_action(&#38;#39;thematic_categoryloop&#38;#39;, &#38;#39;add_handmade_intro_categoryloop&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>colfelt on "a loop that runs only on one category archive"</title>
<link>http://themeshaper.com/forums/topic/a-loop-that-runs-only-on-one-category-archive#post-26591</link>
<pubDate>Tue, 24 Apr 2012 10:39:22 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26591@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi all,&#60;/p&#62;
&#60;p&#62;I am trying to call a function/loop specific to one category archive page. What I've done, is to remove the standard loop within my child-theme's functions.php, then replaced it with my 'special' loop.&#60;/p&#62;
&#60;p&#62;So far, I have cracked getting that 'special' loop to work nicely. But what I want to do now, is to only run the function which rips out the normal loop when we are on the category archive of a particular category ('menus').&#60;/p&#62;
&#60;p&#62;Here's my code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// remove the standard loop
function remove_thematic_categoryloop() {
	remove_action(&#38;#39;thematic_categoryloop&#38;#39;, &#38;#39;thematic_category_loop&#38;#39;);
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;remove_thematic_categoryloop&#38;#39;);

// get the name of the category and store it in the variable $catslug
function add_handmade_intro_categoryloop() {
if (is_category( )) {
  $cat = get_query_var(&#38;#39;cat&#38;#39;);
  $yourcat = get_category ($cat);
  $catslug = $yourcat-&#38;gt;slug;

// loop for the content within the current category,
// which has a custom field &#38;#39;intro_article&#38;#39; which is equal to 1
$handmade_query = new WP_Query(&#38;#39;category_name=&#38;#39;.$catslug.&#38;#39;&#38;#38;meta_key=intro_article&#38;#38;meta_value=1&#38;#39;);
while ($handmade_query-&#38;gt;have_posts()) : $handmade_query-&#38;gt;the_post();  ?&#38;gt;

&#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/h1&#38;gt;
&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;&#38;lt;?php the_content(); ?&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;?php endwhile;
wp_reset_postdata(); ?&#38;gt;

&#38;lt;?php
// now loop to create an unordered list of the other posts in the category
// but which have a custom field &#38;#39;intro_article&#38;#39; which is equal to 0
?&#38;gt;
&#38;lt;ul id=&#38;quot;sub-nav-ul&#38;quot;&#38;gt;
&#38;lt;?php
 query_posts(&#38;#39;category_name=&#38;#39;.$catslug.&#38;#39;&#38;#38;meta_key=intro_article&#38;#38;meta_value=0&#38;#39;);
 if (have_posts()) : while (have_posts()) : the_post();  ?&#38;gt;

 &#38;lt;li id=&#38;quot;sub-nav&#38;quot; class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ?&#38;gt;&#38;quot; rel=&#38;quot;bookmark&#38;quot; title=&#38;quot;Permanent Link to &#38;lt;?php the_title_attribute(); ?&#38;gt;&#38;quot;&#38;gt; &#38;lt;?php the_post_thumbnail(array(70,70));?&#38;gt;&#38;lt;span&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;

&#38;lt;?php endwhile; endif; ?&#38;gt;&#38;lt;/ul&#38;gt; &#38;lt;?php
}
}
add_action(&#38;#39;thematic_categoryloop&#38;#39;, &#38;#39;add_handmade_intro_categoryloop&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So, I've tried to put in some &#34;if (is_category('menus'))&#34; stuff in before the function, which didn't work... and I have subsequently hit a wall and need some inspiration. I only want to call these functions if the category is 'menus'...&#60;/p&#62;
&#60;p&#62;Can anybody help me get over this hump? it would save me some hair. Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>siguy on "How are you using Thematic?"</title>
<link>http://themeshaper.com/forums/topic/how-are-you-using-thematic/page/9#post-26360</link>
<pubDate>Mon, 16 Apr 2012 04:55:17 +0000</pubDate>
<dc:creator>siguy</dc:creator>
<guid isPermaLink="false">26360@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey guys, I'm using thematic again for the next in line for redesigns in the Megahair Salon's stable of brands, &#60;a href=&#34;http://www.zennkai.com&#34;&#62;Zennkai Salons&#60;/a&#62;. Currently the site is hosted here: &#60;a href=&#34;http://zenndev.bjb.ca&#34;&#62;http://zenndev.bjb.ca&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Each time I do this I learn something new and things get easier and more streamlined.&#60;/p&#62;
&#60;p&#62;Notable features this time are a more thorough use of hooks to add the extra nav and social links in the header and a more advanced hook to add an image before .entry-content on some pages. Here's what it looks like if anybody is interested in doing something similar:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// add support for an image that appears before the main content area.
// image in images folder named pg_$ID.gif will be put atop of page $ID
function precontent_image() {
	$imgloc = get_stylesheet_directory().&#38;#39;/images/pg_&#38;#39;.get_the_ID().&#38;#39;.gif&#38;#39;;
	$imgfile = get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;).&#38;#39;/images/pg_&#38;#39;.get_the_ID().&#38;#39;.gif&#38;#39;;
	if (file_exists($imgloc)) { ?&#38;gt;
		&#38;lt;div id=&#38;quot;precontent-image&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;lt;?php echo $imgfile ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;
	&#38;lt;?php }
}
add_action(&#38;#39;thematic_abovecontent&#38;#39;, &#38;#39;precontent_image&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Jagst3r15 on "How are you using Thematic?"</title>
<link>http://themeshaper.com/forums/topic/how-are-you-using-thematic/page/9#post-26153</link>
<pubDate>Wed, 04 Apr 2012 04:31:02 +0000</pubDate>
<dc:creator>Jagst3r15</dc:creator>
<guid isPermaLink="false">26153@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thanks. I updated it and the Theme Options are now fully functional. Will be releasing a new theme soon too.
&#60;/p&#62;</description>
</item>
<item>
<title>robYardman on "How are you using Thematic?"</title>
<link>http://themeshaper.com/forums/topic/how-are-you-using-thematic/page/9#post-26147</link>
<pubDate>Tue, 03 Apr 2012 22:26:32 +0000</pubDate>
<dc:creator>robYardman</dc:creator>
<guid isPermaLink="false">26147@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey nice work Jagst.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Modifying main loop"</title>
<link>http://themeshaper.com/forums/topic/modifying-main-loop#post-26077</link>
<pubDate>Sun, 25 Mar 2012 13:48:41 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26077@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;take the thematic_index_loop() function and copy it into your functions.php.  then rename it to childtheme_override_index_loop().  that's how i usually work with any of the override functions.
&#60;/p&#62;</description>
</item>
<item>
<title>leemon on "Modifying main loop"</title>
<link>http://themeshaper.com/forums/topic/modifying-main-loop#post-26074</link>
<pubDate>Sun, 25 Mar 2012 09:38:44 +0000</pubDate>
<dc:creator>leemon</dc:creator>
<guid isPermaLink="false">26074@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thanks for the suggestions, helgatheviking. I'll take a deeper look into this.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Modifying main loop"</title>
<link>http://themeshaper.com/forums/topic/modifying-main-loop#post-26069</link>
<pubDate>Sat, 24 Mar 2012 22:12:45 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26069@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;childtheme_override_index_loop() is how you create your own loop.  i think you are going to have a tough time implementing that layout though, w/o some serious hackery.  the posts are all in the #container and the sidebar is OUTSIDE that.  you might have to move the index loop to another hook?  no idea if that will work.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
