benbkk
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Main Navigation Does not Show on Calendar PageHi Barry
Thats OK these things happen all the time. I think it’s because the theme was created prior to 3.6 so big update needs to be done anyway. When I’m done with that I’m gonna try again. The weird thing is that the single page is not showing anything while I have no problem with the archive. So I totally not getting what is the issue.Thanks
Forum: Plugins
In reply to: [The Events Calendar] Main Navigation Does not Show on Calendar PageHi Barry
I’m having the same problem also. I’m using list-view. We can see the navigation when we first arrive on the page. Then if i click previous then go back it is gone until I refresh the page.
My single also not showing anything after I upgrade to 3.2 and I can’t figure out why or what is the problem.
And now it keep showing upcoming events when there is none, I think it wasnt like that on the previous version. I think it was like normal wordpress blog page, showing the most recent. Now it is showing today’s date with text that are suppose to be links but not linked to anything such as ‘find events’ ‘no events’ – it’s like everything from the notice and filters show up there and I have no idea where it comes from.
I was very happy when first to find this plugin few months back but after the most recent upgrade I got more unexpected extra work. I am now trying to restore the older version and if its still not working I think I’m just gonna do my own cpt, no matter how lousy it will be. ??
Forum: Plugins
In reply to: How to embed audio / video with URL retrieved from custom fields?Hi again Devin,
Geez i hope im not too much on this. I finally able to get it working with the below
function video_url_content($content) { global $post; if ( has_post_format('video', $post_id) ) { $supported = wp_get_video_extensions(); $video_url = get_post_meta($post->ID, '_format_video_embed', true); $video_pathinfo = pathinfo($video_url); $video_ext = $video_pathinfo['extension']; if ( in_array($video_ext, $supported) ) { $video = do_shortcode('[video src="' . $video_url . '"]'); } else { $video = wp_oembed_get($video_url); } $content .= $video; } return $content; } add_filter( 'the_content', 'video_url_content');
So if the $video_url has one of the standard extensions that is supported by wp, it will do the video src shortcode. If not, it will try to oembed the url.
Is this ok? or would you know any other/better solution?
Thanks
BenForum: Plugins
In reply to: How to embed audio / video with URL retrieved from custom fields?Hi again Devin,
Start to get it but still not working as expected. Here’s my code
// video url as content function video_url_content($content) { global $post; if ( has_post_format('video', $post_id) ) { $video_url = get_post_meta($post->ID, '_format_video_embed', true); $content .= $video_url; } return $content; } add_filter( 'the_content', 'video_url_content');
with the above, I got the URL added to the_content but it is not rendered as player, only URL being echoed.
If I put the shortcode there so
//video url as content function video_url_content($content) { global $post; if ( has_post_format('video', $post_id) ) { $video_url = get_post_meta($post->ID, '_format_video_embed', true); $video = do_shortcode('[video src="' . $video_url . '"]'); $content .= $video; } return $content; } add_filter( 'the_content', 'video_url_content');
I can get the video embedded, but not with external source video (youtube, etc), even if I change the shortcode to [youtube=…] – this will result in a youtube link displayed, not the player.
What have I missed?
Many thanks
BenForum: Plugins
In reply to: How to embed audio / video with URL retrieved from custom fields?Hi Devin,
Thanks for your help.
Turns out there was small mistake in the field video_url. It works after I fixed it,BUT… it only works with [video src=" "] shortcode. That means, it is still different from the_content. Because on the_content, URL only is enough to render a player.
It doesn’t work either if I put common external source like youtube, even if i use [youtube=] shortcode.
Means I still need to find another way with this filter you recommended,
however… I’ve spent hours but still can’t figure out how to use the filter for this purposeI don’t quite get it. If I use this filter, to my understanding it will add the URL to the_content. But wouldn’t that be I still need to call the_content(); instead of the custom field itself? -which didn’t work anyway after I tried lol!
Could you please please show an example how to use it for my purpose? ??
Many thanks
BenForum: Plugins
In reply to: How to embed audio / video with URL retrieved from custom fields?Hi Devin,
Thanks for the reply.
Yes I did try with shortcode also, but didn’t work either. The difference is only now it becomes a link rather than just an echo. But still its not embedded.It only works if I call the_content();
I have tried put it as excerpts, it didn’t work either.Its that the way it is or have I missed something?
Thanks again
hello again
sorry nevermind i found a way. I finally deactivate & remove the wp plugin completely then reinstall manually with the latest version found on mediaelement.js website and it works smoothly!
Bad WP ??