<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Featured image as background to post title? &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/feed/</link>
		<description></description>
		<lastBuildDate>Fri, 14 Nov 2025 08:59:38 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-149803</guid>
					<title><![CDATA[Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-149803</link>
					<pubDate>Fri, 21 Nov 2014 11:41:12 +0000</pubDate>
					<dc:creator>Tristan A</dc:creator>

					<description>
						<![CDATA[
						<p>Hi all,</p>
<p>Here&#8217;s what I am trying to achieve: I want the featured image of posts to appear as background to the post title. Much like <a href="http://markmanson.net/artist-entrepreneur" rel="nofollow">http://markmanson.net/artist-entrepreneur</a> or <a href="http://tdeditordemo.wordpress.com/2014/06/10/reasons-for-traveling/" rel="nofollow">http://tdeditordemo.wordpress.com/2014/06/10/reasons-for-traveling/</a></p>
<p>Having researched the knowledge base and the forum, I have come to the conclusion that this is not a feature of the theme. So i found this code (see below) that supposedly should do what I want, but I have no idea where to put it. Adding it to header.php doesn&#8217;t do anything. I am developing on XAMPP locally, so unfortunately I cannot link to my site. I am using the Ethos stack.</p>
<p>&lt;?php</p>
<p>if (has_post_thumbnail()) { //if a thumbnail has been set</p>
<p>	$imgID = get_post_thumbnail_id($post-&gt;ID); //get the id of the featured image<br />
	$featuredImage = wp_get_attachment_image_src($imgID, &#8216;full&#8217; );//get the url of the featured image (returns an array)<br />
	$imgURL = $featuredImage[0]; //get the url of the image out of the array</p>
<p>	?&gt;<br />
	&lt;style type=&#8221;text/css&#8221;&gt;</p>
<p>    .header-image {<br />
        border:none;<br />
        color:black;<br />
         background-image: url(&lt;?php echo $imgURL ?&gt;);</p>
<p>		}</p>
<p>  &lt;/style&gt;</p>
<p>  &lt;?php<br />
}//end if</p>
<p>?&gt;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-150294</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-150294</link>
					<pubDate>Sat, 22 Nov 2014 02:14:11 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Tristan,</p>
<p>Thanks for posting in.</p>
<p>This code may not work on X existing layout, and we can&#8217;t support applying this as. But I could help you with different workaround.</p>
<p>First, setup a sample post with big featured image, and our goal is to finish it something like this.</p>
<p><img decoding="async" src="https://cldup.com/A-eKz8_PsV.png" alt="" /></p>
<p>Because this requires a template change, I&#8217;d advise that you setup a <a href="http://theme.co/x/member/kb/how-to-setup-child-themes/" title="Child Themes" target="_blank" rel="nofollow">child theme</a>. This allows you to make code changes that won&#8217;t be overwritten when an <strong>X</strong> update is released. After your child theme is setup, please review how we recommend making template changes in <a href="http://theme.co/x/member/kb/customization-best-practices/" rel="nofollow">Customization Best Practices</a>.</p>
<p>1. Add this css at your customizer&#8217;s custom css under <strong>Admin &gt; Appearance</strong>.</p>
<pre><code>.single .has-post-thumbnail .entry-featured {
position: relative;
}
.single .has-post-thumbnail .entry-featured .entry-header {
position: absolute;
z-index: 99;
top: 45%;
width: 100%;
padding: 20px;
background-color: rgba(255, 255, 255, 0.35);
}</code></pre>
<p>2. Create a file named <strong>content.php</strong> at your child theme (eg. <strong>wp-content ▸ themes ▸ x-child-ethos ▸ framework ▸ views ▸ ethos</strong> )</p>
<p>3. Edit your child theme&#8217;s <strong>content.php</strong> and add this code replacing everything.</p>
<pre><code>&lt;?php

// =============================================================================
// VIEWS/ETHOS/CONTENT.PHP
// -----------------------------------------------------------------------------
// Standard post output for Ethos.
// =============================================================================

$is_index_featured_layout = get_post_meta( get_the_ID(), &#039;_x_ethos_index_featured_post_layout&#039;,  true ) == &#039;on&#039; &amp;&amp; ! is_single();

?&gt;

&lt;article id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
  &lt;?php if ( $is_index_featured_layout ) : ?&gt;
    &lt;?php x_ethos_featured_index(); ?&gt;
  &lt;?php else : ?&gt;
    &lt;?php if ( has_post_thumbnail() ) : ?&gt;
      &lt;div class=&quot;entry-featured&quot;&gt;
        &lt;?php if ( ! is_single() ) : ?&gt;
          &lt;?php x_ethos_featured_index(); ?&gt;
        &lt;?php else : ?&gt;
          &lt;?php x_featured_image(); ?&gt;
          &lt;?php x_get_view( &#039;ethos&#039;, &#039;_content&#039;, &#039;post-header&#039; ); ?&gt;
        &lt;?php endif; ?&gt;
      &lt;/div&gt;
    &lt;?php endif; ?&gt;
    &lt;div class=&quot;entry-wrap&quot;&gt;
      &lt;?php if( !is_single() || !has_post_thumbnail() ) x_get_view( &#039;ethos&#039;, &#039;_content&#039;, &#039;post-header&#039; ); ?&gt;
      &lt;?php x_get_view( &#039;global&#039;, &#039;_content&#039; ); ?&gt;
    &lt;/div&gt;
  &lt;?php endif; ?&gt;
&lt;/article&gt;</code></pre>
<p>4. Save and upload.</p>
<p>Hope this helps 🙂 </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151455</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151455</link>
					<pubDate>Mon, 24 Nov 2014 10:36:47 +0000</pubDate>
					<dc:creator>Tristan A</dc:creator>

					<description>
						<![CDATA[
						<p>Excellent, works! </p>
<p>Thank you so much for all the help!</p>
<p>Kind regards, Tristan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151536</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151536</link>
					<pubDate>Mon, 24 Nov 2014 12:42:40 +0000</pubDate>
					<dc:creator>Tristan A</dc:creator>

					<description>
						<![CDATA[
						<p>In the meantime, I decided to switch over to the Integrity stack and as I am using Integrity Light, I have set up the Integrity Light Stack as per your instructions in the knowledge base. </p>
<p>What would this PHP code look like for the Integrity Light child theme? Replacing &#8216;ethos&#8217; for &#8216;Integrity&#8217; doesn&#8217;t do the trick 🙁</p>
<p>Thanks again!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151686</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151686</link>
					<pubDate>Mon, 24 Nov 2014 15:12:26 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Tristan,</p>
<p>Thanks for writing in! To assist you with this issue, we&#8217;ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you.</p>
<p>Thank you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151749</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151749</link>
					<pubDate>Mon, 24 Nov 2014 16:37:39 +0000</pubDate>
					<dc:creator>Tristan A</dc:creator>

					<description>
						<![CDATA[
						<p>Unfortunately, I am building the site on a local development server, so I would not be able to provide you with a URL that you can access. Please note that I have not made any modifications to the (child) theme, other than adding in the CSS code as provided by you (see above). </p>
<p>thank you,</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151950</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-151950</link>
					<pubDate>Mon, 24 Nov 2014 21:22:08 +0000</pubDate>
					<dc:creator>Friech</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Tristan,</p>
<p>since the principles above works for your site, we can use also follow that for Integrity,</p>
<p>Because this requires a template change, I&#8217;d advise that you setup a <a href="http://theme.co/x/member/kb/how-to-setup-child-themes/" title="Child Themes" target="_blank" rel="nofollow">child theme</a>. This allows you to make code changes that won&#8217;t be overwritten when an <strong>X</strong> update is released. After your child theme is setup, please review how we recommend making template changes in <a href="http://theme.co/x/member/kb/customization-best-practices/" rel="nofollow">Customization Best Practices</a>.</p>
<p>1. Add this css at your customizer’s custom css under <strong>Admin</strong> &gt; <strong>Appearance.</strong></p>
<pre><code>.single .has-post-thumbnail .entry-featured {
position: relative;
}

.single .has-post-thumbnail .entry-featured .entry-header {
	font-size: 14px;
	position: absolute;
	top: 45%;
	width: 100%;
	background-color: rgba(255, 255, 255, 0.35);
	padding: 20px;
}</code></pre>
<p>2. Create a file named content.php at your child theme (eg. wp-content ▸ themes ▸ x-child-integrity-light ▸ framework ▸ views ▸ integrity )</p>
<p>3. Edit your child theme’s content.php and add this code replacing everything.</p>
<pre><code>&lt;?php

// =============================================================================
// VIEWS/INTEGRITY/CONTENT.PHP
// -----------------------------------------------------------------------------
// Standard post output for Integrity.
// =============================================================================

?&gt;

&lt;article id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
  &lt;div class=&quot;entry-featured&quot;&gt;
    &lt;?php x_featured_image(); ?&gt;
    &lt;?php x_get_view( &#039;integrity&#039;, &#039;_content&#039;, &#039;post-header&#039; ); ?&gt;
  &lt;/div&gt;
  &lt;div class=&quot;entry-wrap&quot;&gt;
    &lt;?php x_get_view( &#039;global&#039;, &#039;_content&#039; ); ?&gt;
  &lt;/div&gt;
  &lt;?php x_get_view( &#039;integrity&#039;, &#039;_content&#039;, &#039;post-footer&#039; ); ?&gt;
&lt;/article&gt;</code></pre>
<p>4. Save and upload.</p>
<p>hope this also works for your site.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-153137</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-153137</link>
					<pubDate>Wed, 26 Nov 2014 12:24:58 +0000</pubDate>
					<dc:creator>Tristan A</dc:creator>

					<description>
						<![CDATA[
						<p>Thank you! Works!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-153348</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-153348</link>
					<pubDate>Wed, 26 Nov 2014 17:09:14 +0000</pubDate>
					<dc:creator>John Ezra</dc:creator>

					<description>
						<![CDATA[
						<p>You&#8217;re welcome! Contact us for support anytime!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-270046</guid>
					<title><![CDATA[Reply To: Featured image as background to post title?]]></title>
					<link>https://theme.co/archive/forums/topic/featured-image-as-background-to-post-title/#post-270046</link>
					<pubDate>Sun, 10 May 2015 10:32:37 +0000</pubDate>
					<dc:creator>Tristan A</dc:creator>

					<description>
						<![CDATA[
						<p>This seems to have stopped working now? Perhaps with one of the theme updates?</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

