• Resolved Rob

    (@robmuzo)


    Hi guys, I’m trying to pull a dynamic meta generated alt tag onto a dynamic generated image using magic fields plugin.

    here is the code:

    <?php $logos = getGroupOrder('cl_logo_image');
    foreach($logos as $logo){ ?>
    
    <?php echo get('cl_logo_image_alt',$logo).""; ?>
    <?php echo get_image('cl_logo_image',$logo).""; ?>
    
     <?php } ?>

    Any ideas how I can display the first call to ‘cl_logo_image_alt’ inside the second call as an alt tag?

    thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter Rob

    (@robmuzo)

    Fixed it used get in place of get_image:

    <?php $logos = getGroupOrder('cl_logo_image');
    foreach($logos as $logo){ ?>
    
    <img src="<?php echo get('cl_logo_image',$logo).""; ?>" width="90" height="90" alt="<?php echo get('cl_logo_image_alt',$logo).""; ?>" title="<?php echo get('cl_logo_image_alt',$logo).""; ?>" />
    
     <?php } ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Displaying alt dynamic alt tag on dynamic image’ is closed to new replies.