• Hi there,

    I think this will be pretty easy to answer, my php is pretty ropey!

    I have a custom field (using advanced custom fields) which outputs full shortcode for adding a slideshare presentation to a page:

    [slideshare id=7901921&doc=embed-slideshare-110509200429-phpapp01]

    I am having trouble getting the php right when it comes to displaying the custom field correctly:

    <?php 	$slides = the_sub_field('slideshare');
                    echo do_shortcode('" .$slides. "'); ?>

    This is obviously incorrect but can anyone tell me how I do it?

    Thanks

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

    (@j_mo)

    Simple change if anyone is interested…

    <?php 	$slides = get_sub_field('slideshare');
                    echo do_shortcode('" .$slides. "'); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Adding a custom field to do_shortcode’ is closed to new replies.