Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Pictures + Alt Text


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Nov 26, 2012, 01:37 PM
Thierry85's Avatar
Thierry85
 
6 posts · Nov 2012
France
Hello

I have a question about pictures because it seems that the home, category, archives and tags page does not show the titles and alt text which are essential for seo.

Title and alt text are available but only on single page...
  #2  
Old Nov 26, 2012, 04:53 PM
juggledad's Avatar
juggledad
 
21,685 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
multi post pages display excerpts of the posts. Following Wordpress lead, all html is stripped from an excerpt hence what you experience.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #3  
Old Nov 27, 2012, 04:23 AM
Thierry85's Avatar
Thierry85
 
6 posts · Nov 2012
France
Hello juggledad and thanks for your reply

Go to this website with www.investir-et-reussir.fr and you will see that images of my homepage does not have alt text
  #4  
Old Nov 27, 2012, 09:33 AM
juggledad's Avatar
juggledad
 
21,685 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
I have created an enhancement request RFE 013-06: have bfa_thumb return title and 'alt' text and notified the developer
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #5  
Old Dec 22, 2012, 09:11 AM
darkcrizt's Avatar
darkcrizt
 
6 posts · Dec 2012
Hi I was also in the same situation as you can use the titles of the entries in the images as alt agregre only a function in functions.php and edit some lines thumb.php
PHP Code:
//alt imagen by darkcrizt
function add_rel_lightbox($content)
{
    
//Comprueba en la pagina los enlaces directos a las imagenes (sin los atributos)
    
$string '/<a href="(.*?).(jpg|jpeg|png|gif|bmp|ico)"><img(.*?)class="(.*?)wp-image-(.*?)" \/><\/a>/i';
    
preg_match_all$string$content$matchesPREG_SET_ORDER);
    
//Comprueba si el adjunto tiene refetencia
    
foreach ($matches as $val
    {
        
$slimbox_caption '';
        
$post get_post($val[5]);
        
$slimbox_caption esc_attr$post->post_content );
        
//Sustituye al instancia con el Lightbox y las refetencias. No fallará si leyenda está vacía.
        
$string '<a href="' $val[1] . '.' $val[2] . '"><img' $val[3] . 'class="' $val[4] . 'wp-image-' $val[5] . '" /></a>';
        
$replace '<a href="' $val[1] . '.' $val[2] . '" ><img' $val[3] . 'class="photo thumb ' $val[4] . 'wp-image-' $val[5] . '" itemprop="photo" rel="v:photo" alt="'.get_the_title().'"/></a>';
        
$content str_replace$string$replace$content);
    }
    return 
$content;
}
/* Filter Hook */
add_filter('the_content''add_rel_lightbox'2); 
in thumb.php looking for this line

PHP Code:
$bfa_thumb .= '<img src="' $thumbimage['url'] . '" width="' $thumbimage['width'] . '" height="' $thumbimage['height'] . '" />
            <span></span>'

and change it to this

PHP Code:
/* alt in images by darkcrrizt - seo */
$bfa_thumb .= '<img rel="v:photo" itemprop="image" class="photo" src="' $thumbimage['url'] . '" width="' $thumbimage['width'] . '" height="' $thumbimage['height'] . '" alt="'.get_the_title().'" />
            <span></span>'


Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
menus with pictures todo1979 Page & Category Menu Bars 1 Sep 10, 2011 01:19 PM
text not wrapping around pictures in posts. GuruJ Center area post/pages 3 Jul 13, 2011 08:31 AM
Pictures in excerpts Per Lund Excerpts, Read more, Pagination 5 Oct 14, 2009 12:31 PM
Two pictures in Header instead of one? TheSidewinder Header configuration & styling 1 Apr 22, 2009 04:14 PM
Pictures get cut off at end of text MustacheGlory Atahualpa 3 Wordpress theme 0 Mar 24, 2009 09:37 AM


All times are GMT -6. The time now is 03:52 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.