Hello
First of all I want to say that I’m a programming amateur, and my knowledge of php is very very limited, and all has been learnt by trial an error!
I want to display some oEmbed media in my portfolio page. For that I have created two new php files in my theme. For that I’ve used Pods to add an oEmbed field in each of my portfolio items. Then I’ve created two new php files in the theme, in which I’ve changed the “content” for “projcontent”
do_action( 'generate_after_entry_header' );
$embeded_media = get_post_meta($post->ID, 'embeded_media', true);
if ( generate_show_excerpt() ) : ?>
<div class="entry-summary" itemprop="text">
<?php
echo '<div class="embeded_media embeded_media_archive">';
echo $embeded_media;
echo '</div>';
the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else :
if($embeded_media != '') {
echo '<div class="embeded_media embeded_media_archive">';
echo $embeded_media;
echo '</div>';
}
?>
<div class="entry-content" itemprop="text">
This way I was able to embed the media. But since I now have GP Premium with Hooks, I wanted to do it that way. However, when I paste in the appropriate hook the code:
$embeded_media = get_post_meta($post->ID, ’embeded_media’, true);
<?php
echo '<div class="embeded_media embeded_media_archive">';
echo $embeded_media;
echo '</div>';
?>
it just doesn’t work. Nothing happens.
Am I missing something here? Doesn’t GP have access to the Pods fields?
Thanks!