Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

Pictures + Alt Text


  #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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
multi post pages display excerpts of the posts. Following Wordpress lead, all html is stripped from an excerpt hence what you experience.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I have created an enhancement request RFE 013-06: have bfa_thumb return title and 'alt' text and notified the developer
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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:20 AM.


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