• I currently use custom fields to define which smooth gallery I want to display in an area on my site (see example here [url]https://www.simdavis.com/blog/?p=553[/url]), and the code is as follows

    <?php $gallery = get_post_meta($post->ID, 'gallery', true); ?>
    
    <?php
      $content = "[smooth=id: $gallery; width:800; height:600; timed:false; arrows:true; carousel:false; links:false; info:true; align:center; frames:true;]";
      smooth_show($content);
    ?>				</div>

    i want to be able to use a custom field so that if i have a field say ‘photo’ which has a value then a gallery is displayed (the above code), whereas if i have a field that says ‘Video’ with a value of the embed code from vimeo or youtube etc then it shows that instead.

  • The topic ‘Custom Fields advance’ is closed to new replies.