PHP syntax help wanted
-
I am using a theme called Portfolium. I want to display an NGgallery slideshow in a portfolio page
I have got as far as calling a Custom field (NGgallery id) but don’t know the syntax to parse the result correctly in single-portfolio.php which is the PHP that renders the portfolio page
Simple stuff for you PHP experts:
1 – do the [slideshow= bit –
<?php include do_shortcode('[slideshow id='); ?>
2 – pull out the gallery id –<?php $key="--nggalleryid"; echo get_post_meta($post->ID, $key, true); ?>
3 – put the end on the slideshow tag –<?php include ' w=785 h=521]'; ?>
OK, this PHP outputs the gallery code but doesn’t parse it to show the gallery
<?php echo'[slideshow id='; $key="--nggalleryid"; echo get_post_meta($post->ID, $key, true); echo ' w=785 h=521]'; ?>
This outputs [slideshow id=1 w=785 h=521] – that code, in a page or post, brings up a NGG gallery but my code is showing the shortcode, not parsing it
Help!
- The topic ‘PHP syntax help wanted’ is closed to new replies.