elsnare Posted October 18, 2013 Share Posted October 18, 2013 Hello and thank you for your time. Long story short I need to put: <? wpsc_the_custom_fields( 'slug=url-movie')?> <?php print insert_proplayer( array(), 'RIGHT HERE' ); ?> Unfortunately after trying for around 2h I could not make it to work. The custom field returns an url, that should be loaded into the player code. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/283089-probably-a-simple-code-formating-problem/ Share on other sites More sharing options...
halben Posted October 18, 2013 Share Posted October 18, 2013 <? wpsc_the_custom_fields( 'slug=url-movie')?> Add <?php Link to comment https://forums.phpfreaks.com/topic/283089-probably-a-simple-code-formating-problem/#findComment-1454493 Share on other sites More sharing options...
requinix Posted October 19, 2013 Share Posted October 19, 2013 Or maybe you're asking for <?php print insert_proplayer( array(), // wpsc_the_custom_fields( 'slug=url-movie') ); ?>which isn't easy because apparently wpsc_the_custom_fields() outputs information instead of returning it. Which is one of the reasons why every good developer I know personally loathes WordPress. You'd have to do stupid crap with output buffering <?php ob_start(); wpsc_the_custom_fields( 'slug=url-movie'); print insert_proplayer( array(), ob_get_clean() ); ?>Can you modify insert_proplayer() to not need that wpsc_the_custom_fields() as an argument? It's all getting printed anyways. Link to comment https://forums.phpfreaks.com/topic/283089-probably-a-simple-code-formating-problem/#findComment-1454500 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.