• I’m using PowerPress w/ Custom Post Podcasting. The function get_the_powerpress_content(); doesn’t seem to be working on a custom WP_Query loop that displays each post type w/ meta data, including the player for each respective item on the page. This would be in reference to the taxonomy-archive page for these post types. I have read that PP does something to avoid multiple players appearing on a page… is this possibly the cause? the CPT does indeed have a podcast assigned to it… so I’m just not sure why it won’t see that it has that entered, then output it via echoing. I’ve tried purging my cache and using the fixit menu (only trying the first option, admittedly, under the dropdown.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter thoughtwell

    (@thoughtwell)

    I’m using the following (pretty much straight from the docs):

    
    <?php
    if($episode_content){ ?>
    <div><fieldset class="episode-box">
    <legend>Podcast Episode</legend>
    <php echo $episode_content; ?>
    </fieldset>
    </div>
    <?php } ?>
    

    the variable “$episode_content” is declared at the beginning of the while loop for posts via:

    $episode_content = get_the_powerpress_content();

    Plugin Author Angelo Mandato

    (@amandato)

    Hello @thoughtwell,

    PowerPress has logic to only add a player and links to the main WordPress loop, it ignores custom WP_Query loops. This is because various theme sand plugins use custom loops for other purposes and back when we did not do this there would be multiple players on a single page in some cases. BUT the way to get around this is to have your theme call the get_the_powerpress_content function.

    Go to PowerPress settings > Website tab, make sure you have the top option “Enable PowerPress Media Players and Links” enabled.

    Also make sure you do not have any other podcasting plugins enabled. If you have PodPress or TGS podcasting (or other podcast plugin) enabled then PowerPress disables itself to prevent multiple players and multiple duplicate tags in the feeds.

    Thread Starter thoughtwell

    (@thoughtwell)

    Okay, checked settings and they are consistent w/ your suggestion. I am also using get_the_powerpress_content(); as mentioned in my code snippet… I’ve actually used several variations of it as well as the do_shortcode(‘[power press]’); tag/function and still no luck. I looked deeper at my code and the irony is, in the CPT archive where I use WP_Query, it will work. Where it’s not working (the deeper-level taxonomy archive page) I’m actually NOT using a new Query since it’s using the default taxonomy loop… so I was incorrect in my explanation. But still, no luck.

    While it would be nice if I can get it working so we can have the audio player sitting in tandem with our video presentations, in all honesty, I kind of perceive this as being redundant when there’s a video sitting right along next to it. Most likely, a user will opt to utilize the video vs. an audio feed in most cases when they’re on site viewing content. The audio content makes more sense to use when off-site, and for that, it would probably be more to podcast users’ preference to have them subscribe to the podcast feed, directly using whatever service they typically use to consume this type of content.

    Therefore, until I (or someone in your camp or out on the internet trying to do the same) can figure it out, I’ll probably just include a modal popup that pulls up the subscription options, calling that page content from the subscription page. I can still include the latest podcast within a player in the featured block on the next-level up (CPT Archive where it works).

    This seems like the most logical workaround without reinventing the wheel. However, if you come up w/ a reason why get_the_powerpress_content(); won’t work on a taxonomy loop and the issue gets resolved, perhaps we can introduce the audio player later. It’s a compromise, but the modal subscription option should do… at least for now. Unfortunately, as more of a front-end fellow, I don’t quite have the skill-set to dissect the plugin’s code and figure this out.

    Thank you, Angelo. Any and all help is certainly appreciated.

    Plugin Author Angelo Mandato

    (@amandato)

    Hello @thoughtwell,

    Lots of things to address…

    Podcast Channels / Post Type podcasting and player options: You can decide under the website settings in each podcast channel/post type settings page if a player and links are displayed or not. It is common for podcasters to only show the video on their website if they do both a live audio and video. More importantly the option lets you use an embed instead of the player, so if you post your video to YouTube that is the embed you can put into the episode meta data that way the YouTube player is displayed rather than the default video player. In other words, once you have this logic in place, you can still control what is and is not displayed in PowerPress settings.

    The bigger issue is the problem with the loop and the post type.

    First, double check you did the following: Go to PowerPress settings > Website tab, make sure you have the top option “Enable PowerPress Media Players and Links” enabled.

    Something else may be effecting it. I will give you a complete list.

    • posts are password protected
    • You have another podcast plugin enabled
    • Disable player and links is set at the very top of the PowerPress > website settings tab
    • You did not add post type podcasting feed to the post type
    • Media URL is not valid

    You can edit the code in the powerpress.php where the function get_the_powerpress_content() is and have it return something such as ‘test’ to confirm that the theme is at least calling the function correctly. IF it reaches this far then something is a miss in PowerPress. If it doesn’t add the ‘test’ to your post type pages then something is happening beyond PowerPress’s control.

    Hope this helps further diagnose the problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘get_the_powerpress_content(); not working’ is closed to new replies.