How to fix FEED error when setting categories in Blubrry PowerPress – Kagua! Creator Economy News

How to fix FEED error when setting categories in Blubrry PowerPress – Kagua!  Creator Economy News

2024-03-01 21:00:03

I get an error such as Attempt to read property “ID” on null. Blubrry PowerPress is a standard plugin for distributing podcasts with WordPress. However, if you try to distribute podcasts in a specific category, a warning will appear on Feed. The solution is…

Error output to Podcast FEED

Warning: Attempt to read property “ID” on null in /extras.php on line 106

Warning: Cannot modify header information – headers already sent by (output started at /plugins/powerpress/feed-podcast.php on line 101

I get two Feed errors.

One is that I am getting a warning when trying to print the ID. This error seems to appear when you try to obtain a WordPress ID for pages other than specific pages.

The other error is that the header information cannot be confirmed. It is said that it is output on line 101.

If you fix the warning, the header information will also be correct.

As shown in the code above, add an if statement to process if it is not null.

if ($post !== null && isset($post->ID)) {
    // IDを使用する処理
    if( get_post_meta( $post->ID, '_sidebar_layout', true ) ){
        return get_post_meta( $post->ID, '_sidebar_layout', true );    
    }else{
        return 'right-sidebar';
    }   
}

By the way, when I added this null support, the warning that the header information was incorrect also disappeared. A normal podcast feed is now displayed. Now you can RSS the podcast.

However, this time, I modified inc/extras.php, but it did not work in the child theme. I wrote it directly in the parent theme, so it’s a bit of a bad method. Please let me know if there is a better way.

Vocabulary Notes for Adults Everyone will think “I can do it!” | Takashi Saito

・ ・ ・ ・ ・

>>Cheap!It’s less than half price on Amazonfood time sale
View special sale page

↓↓↓Free newsletter is now being distributed

Podcasts with WordPress

Post Views: 148

1709433084
#fix #FEED #error #setting #categories #Blubrry #PowerPress #Kagua #Creator #Economy #News

Leave a Replay