Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I did a dump of the entire $post and I couldn’t find a ref to the alt text, but it is showing up with the thumbnails i’m pulling with the code.

    object(WP_Post)[2160]
      public 'ID' => int 1154
      public 'post_author' => string '1' (length=1)
      public 'post_date' => string '2012-12-17 18:38:20' (length=19)
      public 'post_date_gmt' => string '2012-12-17 18:38:20' (length=19)
      public 'post_content' => string '' (length=0)
      public 'post_title' => string 'SBT' (length=3)
      public 'post_excerpt' => string '' (length=0)
      public 'post_status' => string 'publish' (length=7)
      public 'comment_status' => string 'closed' (length=6)
      public 'ping_status' => string 'closed' (length=6)
      public 'post_password' => string '' (length=0)
      public 'post_name' => string 'sbt' (length=3)
      public 'to_ping' => string '' (length=0)
      public 'pinged' => string '' (length=0)
      public 'post_modified' => string '2012-12-17 18:38:20' (length=19)
      public 'post_modified_gmt' => string '2012-12-17 18:38:20' (length=19)
      public 'post_content_filtered' => string '' (length=0)
      public 'post_parent' => int 0
      public 'guid' => string 'https://localhost/wespanha/?post_type=clientes&p=1154' (length=57)
      public 'menu_order' => int 0
      public 'post_type' => string 'clientes' (length=8)
      public 'post_mime_type' => string '' (length=0)
      public 'comment_count' => string '0' (length=1)
      public 'filter' => string 'raw' (length=3)

    I’m having a similar problem. I’ve done a var_dump and it’s giving me a string of “string ” (length=0)” for each of the alt texts. There is definitely alt there but it doesn’t seem to be finding it!

    global $post;
    			$args = array( 'numberposts' => 12, 'post_type' => 'clientes', 'orderby' => 'ASC');
    			$myposts = get_posts( $args );
    			foreach( $myposts as $post ) :	setup_postdata($post);
    
    			$alt_text = get_post_meta($post->ID , '_wp_attachment_image_alt', true);
    
    			?>
    			<li>
                    <!--BEGIN .hentry -->
                    <div class="post_box">
                        <div class="post-thumb left gallery">
                            <a href="<?php the_permalink() ?>">
    							<?php the_post_thumbnail('full'); ?>
    							<div class="overlay"><img src="/wp-content/uploads/2012/12/<?php echo $alt_text; ?>.jpg" /></div>
    						</a>
    
    					</div>
                    <!--END .hentry-->
                    </div>
    </li>
    <?php endforeach; var_dump($alt_text);?>

    I also had the same problem, so I started turning off any new extensions I installed. I found one called: Fast Save v1.1 ID: cfjjohldijabngglooemkchgjeidlhnf

    I turned this off and everything seems to be back to normal. I don’t remember installing this extension and I can find no info on it in the Chrome web store.. so a virus it must be!

Viewing 3 replies - 1 through 3 (of 3 total)