Plugin Author
Veda
(@vedathemes)
Hi there,
Thanks for trying Podcast player.
This error message is only visible if you’re logged in as admin. Normal, user will not see anything. Try to re-check the page after logging out.
Please inform if you need more help on this.
Thanks,
Yes, I see it on incognito.
But I would like to show error message for the user, so he will see that the player exists, but there is an error.
Maybe some checkbox, so if admin don’t want to show a message, it will be as now,
But if admin (like me) want to show a message for users, so there will be a message, and also so I can customize the message.
I think many other admins will see this feature as user friendly.
Thanks
Plugin Author
Veda
(@vedathemes)
Hi there,
I will add some provision to display custom message in case of failure in future update. I will update you on this ticket. I am keeping this ticket open till that time.
Please inform if you need more help on it.
Thanks,
Plugin Author
Veda
(@vedathemes)
Hi there,
Does the issue resolved? Do you need more help with it.
Thanks,
hi,
sorry the plugin is auto update so I didn’t see it.
Where can I find this option to add custom message?
Plugin Author
Veda
(@vedathemes)
Hi there,
I am sorry for the late reply.
In latest update, I have added a filter to customize error messages.
Copy and paste following PHP code at the end of your theme’s functions.php file OR in Code Snippet plugin.
add_filter(
'podcast_player_feed_error_msg',
function( $msg, $feed, $args ) {
return '<p>My custom Error message</p>';
},
10,
3
);
Replace error message text with your custom error message.
Note1: Always backup before making PHP changes.
Note2: It is better to use child theme OR code snippet plugin for making changes. As all changes in main theme files will be overwritten on theme update.
Please inform if you need more help on this.
Thanks,
Plugin Author
Veda
(@vedathemes)
Hi there,
I hope the issue will be resolved with the above solution. Therefore, I am closing the ticket. However, feel free to comment on this ticket or raise a new ticket for any problem with podcast player.
Thanks,
Hi,
Can I create some messages by error?
For example:
on error the status code is 450 and content-type is application/json – to show “there was an error showing this podcast, try again later”
on the error 404 – to show “this podcast not available right now”
Etc…
Can you tell us please, all the errors and customize it.
It will be nice if it can be as a part of core plugin and not custom code snippet.
Plugin Author
Veda
(@vedathemes)
Hi there,
1. You can still achieve the functionality using following modifications. You can make more changes if you want.
add_filter(
'podcast_player_feed_error_msg',
function( $msg, $feed, $args ) {
$error = $feed->get_error_code();
if ( '450' === $error ) {
$msg = "there was an error showing this podcast, try again later";
} else if ( '404' === $error ) {
$msg = 'this podcast not available right now';
} else {
$msg = '<p>My custom Error message</p>';
}
return $msg;
},
10,
3
);
2. To keep the plugin lean and simple, we only add new options if they are really required by many of the users. This feature was just requested once. So we might check and hopefully include in future. In any case, the code above will give you much more flexibility.
Please inform if you need more help on this.
Thanks,
-
This reply was modified 5 years, 4 months ago by
Veda.
Thank you 🙂
I think other users don’t care because there is no message to the site-user.
It just show empty.
Plugin Author
Veda
(@vedathemes)
Hi there,
welcome.
By user I mean plugin’s users (Who uses plugin on there website). As I said, I will check the possibility to include these helpful error messages in future updates.
Thanks,