Topic: WP Custom Fields to display SV gallery


I'm having trouble getting my simpleviewer galleries to display using custom fields.

As my php ability is limited I'm trying to adapt a bit of code used for nextgen galleries displaying using Custom Fields (see … tom-field/. I realise that the parameters etc are different between NextGen and SimpleViewer... but I'm not sure what to change.

I've got the latest WP and SV downloads and plugins and I've got the SimpleViewer galleries working as per 'normal'.

On the necessary page I'm creating a custom field name called gallery and for the value I'm simply taking the SV plugin's earlier generated code:  [simpleviewer gallery_id="4" bgcolor="222222" gallery_width ="100%" gallery_height ="744"]

In the php page template I'm including:

<?php $gallery = get_post_meta($post->gallery_id, ‘gallery’, true); ?>
                $gal = $gallery;
                $gal = apply_filters(‘the_content’, $gal );
                echo $gal;

Whilst the page renders without any php errors, no gallery/images are being displayed.

Where is it that am I going wrong? Any help or step-by-step instructions would be very useful.