WordPress.org

Ready to get started?Download WordPress

Forums

Trying to echo template tags custom field (1 post)

  1. wonderboy
    Member
    Posted 8 years ago #

    I Don't Know PHP Syntax can someone please correct the code for me:

    Trying to echo the template tags <?php the_permalink() ?>
    & <?php the_title(); /?> on a custom field image.

    CODE:

    <?php
    if(get_post_custom_values('image')) :
    foreach(get_post_custom_values('image') as $value) {
    echo '<a href="<?php the_permalink ?>"<img src="http://mydomain.com/wp/images/' . $value . '" title="<?php the_title(); ?>" /></a>';
    }
    else :
    echo '<img src="http://mydomain.com/wp/images/no-image.gif" title="no image" />;
    endif; ?>

    thank you for your help

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags