<?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 Topic: Clickable body background via function?</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Wed, 19 Jun 2013 16:31:57 +0000</pubDate>

<item>
<title>helgatheviking on "Clickable body background via function?"</title>
<link>http://themeshaper.com/forums/topic/clickable-body-background-via-function#post-22666</link>
<pubDate>Fri, 12 Aug 2011 22:33:51 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">22666@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;glad you got it working.  just fyi you don't need &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;else {
return false;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;if the IF condition is never satisfied nothing will be added to the hook
&#60;/p&#62;</description>
</item>
<item>
<title>daveread on "Clickable body background via function?"</title>
<link>http://themeshaper.com/forums/topic/clickable-body-background-via-function#post-22663</link>
<pubDate>Fri, 12 Aug 2011 19:51:18 +0000</pubDate>
<dc:creator>daveread</dc:creator>
<guid isPermaLink="false">22663@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thanks Kathy,&#60;/p&#62;
&#60;p&#62;I have cobbled together a solution that adds a transparent image over a section of my body background image(s) that appears to the left of my 988 px main content; it is wrapped with a link that can be varied via conditionals. Following is the function and then the css for the transparent image:&#60;/p&#62;
&#60;p&#62;// outside content link&#60;br /&#62;
function background_link(){&#60;br /&#62;
  if (in_category('news')) {&#60;br /&#62;
  echo '&#60;a href=&#34;http://www.google.com&#34;&#62;&#38;lt;img class=&#34;bg-left&#34; src=&#34;http://designboth.com/demo/wp-content/themes/BLinks/images/bg-hide2.png&#34; alt=&#34;sponsor&#34; /&#38;gt;&#60;/a&#62;';&#60;br /&#62;
  } elseif (in_category('hotels')) {&#60;br /&#62;
   echo '&#60;a href=&#34;http://www.yahoo.com&#34;&#62;&#38;lt;img class=&#34;bg-left&#34; src=&#34;http://designboth.com/demo/wp-content/themes/BLinks/images/bg-hide2.png&#34; alt=&#34;sponsor&#34; /&#38;gt;&#60;/a&#62;';&#60;/p&#62;
&#60;p&#62;} else {&#60;br /&#62;
        return false;&#60;br /&#62;
    }&#60;br /&#62;
}&#60;br /&#62;
  add_action('thematic_before','background_link', 11);&#60;/p&#62;
&#60;p&#62;And the css:&#60;/p&#62;
&#60;p&#62;img.bg-left&#60;br /&#62;
{&#60;br /&#62;
position:absolute;&#60;br /&#62;
left:0px;&#60;br /&#62;
top:0px;&#60;br /&#62;
z-index:100;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;It is working on a test site; if anyone sees where the function can be improved or cleaned up, I'd appreciate the opportunity to learn more.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Clickable body background via function?"</title>
<link>http://themeshaper.com/forums/topic/clickable-body-background-via-function#post-22648</link>
<pubDate>Fri, 12 Aug 2011 03:28:15 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">22648@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;hi dave- thanks for making this a new post.  if you want to add a clickable image then you need to add an image to a hook.  &#60;/p&#62;
&#60;p&#62;see the &#34;primer&#34; i just addressed to someone else on how to add things&#60;/p&#62;
&#60;p&#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;
&#60;p&#62;background images are BACKGROUND though and you can't wrap them w/ a link.  you can add an image to the markup and then absolutely position it (or fixed position it) depending on what your goal is.  do you have a screenshot of what you'd like to accomplish.  a picture is worth 1000 words after all.
&#60;/p&#62;</description>
</item>
<item>
<title>daveread on "Clickable body background via function?"</title>
<link>http://themeshaper.com/forums/topic/clickable-body-background-via-function#post-22646</link>
<pubDate>Fri, 12 Aug 2011 00:56:20 +0000</pubDate>
<dc:creator>daveread</dc:creator>
<guid isPermaLink="false">22646@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I can set various body background images via css using body classes on my child theme.&#60;br /&#62;
For example:&#60;br /&#62;
 body.s-category-twd {&#60;br /&#62;
 background:url(images/bg-jt-hsv.jpg) fixed no-repeat top center #ddd;&#60;br /&#62;
 }&#60;br /&#62;
  body.pageid-781 {&#60;br /&#62;
 background:url(images/bg-sponsor-ad2.png) fixed no-repeat top center #85b916;&#60;br /&#62;
 }&#60;/p&#62;
&#60;p&#62;Could the same be accomplished via functions.php with the background image being wrapped in a link?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
