<?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>BlueOwlCreative  &#187;  Topic: ALT tag in featured image</title>
		<atom:link href="http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/feed/" rel="self" type="application/rss+xml" />
		<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/feed/</link>
		<description></description>
		<pubDate>Fri, 17 Jul 2026 10:14:40 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.5.3-5249</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32277</guid>
					<title><![CDATA[ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32277</link>
					<pubDate>Fri, 24 Nov 2017 15:51:45 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,<br />
I&#8217;m here again to try to resolve this &#8220;problem&#8221;.<br />
In the past I asked <a href="http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image/" target="_blank" rel="nofollow">your support</a> for the same question, and it looks I was able to fix it, but now I realize that I did not.<br />
Please may you help me? I spended all the day trying to insert the ALT tag in post featured images, but I&#8217;m don&#8217;t know php language and I failed 1000 times <img src="http://blueowlcreative.com/support_wp/wp-includes/images/smilies/icon_sad.gif" alt=":-(" class="wp-smiley" /><br />
In my old post you said:<br />
<em>Yes, you need to edit your index.php and single.php templates, then find all occurences of “wp_get_attachment_image_src”<br />
Then add the params for the alt tabs as described here:</p>
<p><a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_image" rel="nofollow">http://codex.wordpress.org/Function_Reference/wp_get_attachment_image</a></p>
<p>Then add the alt attribute to the image below.</em><br />
I tried to edit the files index.php and single.php, but no success&#8230;<br />
Below is just a part of the code that I need to edit&#8230; How to add the params for the alt tab?</p>
<pre><code>&lt;?php // IF Post type is Standard (false) 	
			if(function_exists( &#039;get_post_format&#039; ) &amp;&amp; get_post_format( $post-&gt;ID ) != &#039;gallery&#039; &amp;&amp; get_post_format( $post-&gt;ID ) != &#039;video&#039; &amp;&amp; has_post_thumbnail()) { 
					$thumbbig = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), &#039;portfolio-full&#039; );
					$attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID), &#039;portfolio-main&#039;);
		?&gt;
						&lt;div class=&quot;pic&quot;&gt;
							&lt;a href=&quot;&lt;?php echo $thumbbig[0];?&gt;&quot; rel=&quot;prettyPhoto&quot; title=&quot;&lt;?php echo $post-&gt;post_title; ?&gt;&quot;&gt;
								&lt;img src=&quot;&lt;?php echo $attachment_image[0];?&gt;&quot; /&gt;&lt;div class=&quot;img_overlay_zoom&quot;&gt;&lt;/div&gt;
							&lt;/a&gt;
						&lt;/div&gt;
						
						
						&lt;div class=&quot;h20&quot;&gt;&lt;/div&gt;	
		
		&lt;?php } // IF Post type is Standard :: END ?&gt;
		
		&lt;?php // IF Post type is Gallery
		if (( function_exists( &#039;get_post_format&#039; ) &amp;&amp; get_post_format( $post-&gt;ID ) == &#039;gallery&#039; )) {
					$args = array(
                            &#039;numberposts&#039; =&gt; -1, // Using -1 loads all posts
                            &#039;orderby&#039; =&gt; &#039;menu_order&#039;, // This ensures images are in the order set in the page media manager
                            &#039;order&#039;=&gt; &#039;ASC&#039;,
                            &#039;post_mime_type&#039; =&gt; &#039;image&#039;, // Make sure it doesn&#039;t pull other resources, like videos
                            &#039;post_parent&#039; =&gt; $post-&gt;ID, // Important part - ensures the associated images are loaded
                            &#039;post_status&#039; =&gt; null,
                            &#039;post_type&#039; =&gt; &#039;attachment&#039;
                            );

					$images = get_children( $args );
					
					if($images){ ?&gt;
					
					&lt;div class=&quot;flexslider&quot;&gt;
				        &lt;ul class=&quot;slides&quot;&gt;
						&lt;?php foreach($images as $image){ 
								$attachment = wp_get_attachment_image_src($image-&gt;ID, &#039;portfolio-full&#039;);
								$thumb = wp_get_attachment_image_src($image-&gt;ID, &#039;portfolio-main&#039;); 
						?&gt;
								&lt;li class=&quot;pic&quot;&gt;
										&lt;a href=&quot;&lt;?php echo $attachment[0] ?&gt;&quot; rel=&quot;prettyPhoto[gallery]&quot; title=&quot;&lt;?php echo $image-&gt;post_title; ?&gt;&quot; &gt;
											&lt;img src=&quot;&lt;?php echo $thumb[0] ?&gt;&quot; /&gt;&lt;div class=&quot;img_overlay_zoom&quot;&gt;&lt;/div&gt;
										&lt;/a&gt;
								&lt;/li&gt;
						&lt;?php } ?&gt;						
						&lt;/ul&gt;  
					&lt;/div&gt;</code></pre>
<p>I hope you can help  me, alt tag is important for SEO&#8230;<br />
Ciao.<br />
Enrico</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32283</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32283</link>
					<pubDate>Mon, 27 Nov 2017 11:43:22 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Hey,</p>
<p>You retrieve the Alt attribute like so:</p>
<p><code>$alt_text = get_post_meta($post-&gt;ID, &#039;_wp_attachment_image_alt&#039;, true);</code></p>
<p>So try this:</p>
<pre><code>$thumbbig = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), &#039;portfolio-full&#039; );
$attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID), &#039;portfolio-main&#039;);
$alt_text = get_post_meta($post-&gt;ID, &#039;_wp_attachment_image_alt&#039;, true);
?&gt;
	&lt;div class=&quot;pic&quot;&gt;
		&lt;a href=&quot;&lt;?php echo $thumbbig[0];?&gt;&quot; rel=&quot;prettyPhoto&quot; title=&quot;&lt;?php echo $post-&gt;post_title; ?&gt;&quot;&gt;
			&lt;img src=&quot;&lt;?php echo $attachment_image[0];?&gt;&quot; alt=&quot;&lt;?php echo $alt_text;?&gt;&quot; /&gt;&lt;div class=&quot;img_overlay_zoom&quot;&gt;&lt;/div&gt;
		&lt;/a&gt;
	&lt;/div&gt;</code></pre>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32291</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32291</link>
					<pubDate>Mon, 27 Nov 2017 13:09:41 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						<p>hHi BlueOwl,<br />
thanks for your help.<br />
I tried to do as you suggested, but it does not work.<br />
Below here is the single.php that I had edit.<br />
I did the same in index.php file.<br />
Please, may you check it?</p>
<pre><code>&lt;?php get_header(); ?&gt;
	
&lt;div class=&quot;row&quot;&gt;

&lt;?php if((is_page() || is_single() || is_archive() || is_search()) &amp;&amp; !is_front_page()): ?&gt;
&lt;div class=&quot;row&quot;&gt;
	&lt;div class=&quot;sixteen columns&quot;&gt;
	    &lt;?php boc_breadcrumbs(); ?&gt;
		&lt;div class=&quot;page_heading&quot;&gt;&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;
		
		
	&lt;div class=&quot;twelve columns&quot;&gt;
		
		&lt;!-- Post --&gt;
		&lt;?php while (have_posts()) : the_post(); ?&gt;
		&lt;div &lt;?php post_class(&#039;post-page&#039;); ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &gt;
			
					&lt;!-- Post Begin --&gt;
					&lt;div class=&quot;clearfix&quot;&gt;
							
					
		&lt;?php // IF Post type is Standard (false) 	
			if(function_exists( &#039;get_post_format&#039; ) &amp;&amp; get_post_format( $post-&gt;ID ) != &#039;gallery&#039; &amp;&amp; get_post_format( $post-&gt;ID ) != &#039;video&#039; &amp;&amp; has_post_thumbnail()) { 
					$thumbbig = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), &#039;portfolio-full&#039; );
                    $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID), &#039;portfolio-main&#039;);
                    $alt_text = get_post_meta($post-&gt;ID, &#039;_wp_attachment_image_alt&#039;, true);
		?&gt;
						&lt;div class=&quot;pic&quot;&gt;
		                    &lt;a href=&quot;&lt;?php echo $thumbbig[0];?&gt;&quot; rel=&quot;prettyPhoto&quot; title=&quot;&lt;?php echo $post-&gt;post_title; ?&gt;&quot;&gt;
			                   &lt;img src=&quot;&lt;?php echo $attachment_image[0];?&gt;&quot; alt=&quot;&lt;?php echo $alt_text;?&gt;&quot; /&gt;&lt;div class=&quot;img_overlay_zoom&quot;&gt;&lt;/div&gt;
		                    &lt;/a&gt;
	                    &lt;/div&gt;
						
						
						&lt;div class=&quot;h20&quot;&gt;&lt;/div&gt;	
		
		&lt;?php } // IF Post type is Standard :: END ?&gt;
		
		&lt;?php // IF Post type is Gallery
		if (( function_exists( &#039;get_post_format&#039; ) &amp;&amp; get_post_format( $post-&gt;ID ) == &#039;gallery&#039; )) {
					$args = array(
                            &#039;numberposts&#039; =&gt; -1, // Using -1 loads all posts
                            &#039;orderby&#039; =&gt; &#039;menu_order&#039;, // This ensures images are in the order set in the page media manager
                            &#039;order&#039;=&gt; &#039;ASC&#039;,
                            &#039;post_mime_type&#039; =&gt; &#039;image&#039;, // Make sure it doesn&#039;t pull other resources, like videos
                            &#039;post_parent&#039; =&gt; $post-&gt;ID, // Important part - ensures the associated images are loaded
                            &#039;post_status&#039; =&gt; null,
                            &#039;post_type&#039; =&gt; &#039;attachment&#039;
                            );

					$images = get_children( $args );
					
					if($images){ ?&gt;
					
					&lt;div class=&quot;flexslider&quot;&gt;
				        &lt;ul class=&quot;slides&quot;&gt;
						&lt;?php foreach($images as $image){ 
								$attachment = wp_get_attachment_image_src($image-&gt;ID, &#039;portfolio-full&#039;);
								$thumb = wp_get_attachment_image_src($image-&gt;ID, &#039;portfolio-main&#039;);
								$alt_text = get_post_meta($post-&gt;ID, &#039;_wp_attachment_image_alt&#039;, true);
						?&gt;
								&lt;li class=&quot;pic&quot;&gt;
										&lt;a href=&quot;&lt;?php echo $attachment[0] ?&gt;&quot; rel=&quot;prettyPhoto[gallery]&quot; title=&quot;&lt;?php echo $image-&gt;post_title; ?&gt;&quot; &gt;
											&lt;img src=&quot;&lt;?php echo $attachment_image[0];?&gt;&quot; alt=&quot;&lt;?php echo $alt_text;&quot; /&gt;&lt;div class=&quot;img_overlay_zoom&quot;&gt;&lt;/div&gt;
										&lt;/a&gt;
								&lt;/li&gt;
						&lt;?php } ?&gt;						
						&lt;/ul&gt;  
					&lt;/div&gt;
					
					&lt;?php } // If Images :: END ?&gt; 
						
				
		&lt;?php } // IF Post type is Gallery :: END ?&gt;
		
		&lt;?php	// IF Post type is Video 
				if (( function_exists( &#039;get_post_format&#039; ) &amp;&amp; get_post_format( $post-&gt;ID ) == &#039;video&#039;)  ) {					
					if($video_embed_code = get_post_meta($post-&gt;ID, &#039;video_embed_code&#039;, true)) {
						echo &quot;&lt;div class=&#039;video_max_scale&#039;&gt;&quot;;
						echo $video_embed_code;
						echo &quot;&lt;/div&gt;&quot;;
						echo &#039;&lt;div class=&quot;h20&quot;&gt;&lt;/div&gt;&#039;;
					}										
				} // IF Post type is Video :: END 
		?&gt;
	
		
						&lt;p class=&quot;post_meta&quot;&gt;
							&lt;span class=&quot;calendar&quot;&gt;&lt;?php printf(&#039;&lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt;&#039;, get_permalink(), get_the_date()); ?&gt;&lt;/span&gt;
							&lt;span class=&quot;author&quot;&gt;&lt;a href=&quot;&lt;?php echo get_author_posts_url(get_the_author_meta(&#039;ID&#039; )); ?&gt;&quot;&gt;&lt;?php echo __(&#039;By &#039;,&#039;Aqua&#039;);?&gt; &lt;?php the_author_meta(&#039;display_name&#039;); ?&gt;&lt;/a&gt;&lt;/span&gt;
							&lt;span class=&quot;comments&quot;&gt;&lt;?php  comments_popup_link( __(&#039;No comments yet&#039;,&#039;Aqua&#039;), __(&#039;1 comment&#039;,&#039;Aqua&#039;), __(&#039;% comments&#039;,&#039;Aqua&#039;), &#039;comments-link&#039;, __(&#039;Comments are Off&#039;,&#039;Aqua&#039;));?&gt;&lt;/span&gt;
							&lt;span class=&quot;tags&quot;&gt;&lt;?php the_category(&#039;, &#039;); ?&gt;&lt;/span&gt;
						&lt;/p&gt;
					
						&lt;div class=&quot;post_description clearfix&quot;&gt;
						&lt;?php the_content(); ?&gt;
						&lt;/div&gt;
					&lt;/div&gt;
					&lt;!-- Post End --&gt;

		
		&lt;/div&gt;
							
		&lt;?php wp_link_pages(); ?&gt;

		&lt;?php endwhile; // Loop End  ?&gt;
		&lt;!-- Post :: End --&gt;
		
		&lt;?php comments_template(&#039;&#039;, true); ?&gt;
		
	&lt;/div&gt;	
		
	&lt;?php get_sidebar(); ?&gt;
		
&lt;/div&gt;	

	
&lt;?php get_footer(); ?&gt;	</code></pre>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32297</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32297</link>
					<pubDate>Tue, 28 Nov 2017 08:21:31 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Sure, you will have to give me your FTP access (in a private reply) please.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32298</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32298</link>
					<pubDate>Tue, 28 Nov 2017 09:41:02 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32305</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32305</link>
					<pubDate>Wed, 29 Nov 2017 07:34:06 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Please send over the user/pass for the admin so I can switch off the cache! <img src="http://blueowlcreative.com/support_wp/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /><br />
in a PRIVATE REPLY </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32306</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32306</link>
					<pubDate>Wed, 29 Nov 2017 07:34:06 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Please send over the user/pass for the admin so I can switch off the cache! <img src="http://blueowlcreative.com/support_wp/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /><br />
in a PRIVATE REPLY </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32307</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32307</link>
					<pubDate>Wed, 29 Nov 2017 07:54:55 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32308</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32308</link>
					<pubDate>Wed, 29 Nov 2017 08:08:51 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Ok, got it,<br />
Instead of<br />
<code>$alt_text = get_post_meta($post-&gt;ID, &#039;_wp_attachment_image_alt&#039;, true);</code></p>
<p>it should be:</p>
<p><code>$alt_text = get_post_meta(get_post_thumbnail_id($post-&gt;ID), &#039;_wp_attachment_image_alt&#039;, true);</code></p>
<p>And it goes in your Child theme&#8217;s single.php <img src="http://blueowlcreative.com/support_wp/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32310</guid>
					<title><![CDATA[Reply To: ALT tag in featured image]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/alt-tag-in-featured-image-2/#post-32310</link>
					<pubDate>Wed, 29 Nov 2017 08:54:14 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

