Grow your CSS skills. Land your dream job.

img alt text?

  • # January 23, 2012 at 11:15 am

    Is the img alt text possible with this current code?

    < ?php  if((get_post_meta($post->ID, "image", true))) { ?>

    < ?php } ?>
    # January 23, 2012 at 11:51 am

    What about something like this?

    < ?php  if((get_post_meta($post->ID, "image", true))) { ?>
    <?php the_title(); ?/>
    < ?php } ?>
    # January 23, 2012 at 11:57 am

    That might be my only option. I wanted to match the alt text in the backend, but so far no luck. I tried this.

    <?php get_post_meta($post-/>ID, 
    # January 23, 2012 at 12:28 pm

    Oh, check out the_post_thumbnail() and the arguments you can pass. It has the answer there.

    # January 23, 2012 at 12:38 pm

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".