• Resolved arunazx

    (@arunazx)


    iam using wp user frontend for accepting frntend posts.so accepts video url via embed feild the meta key is “my_video”. using this filtration is not working, any other steps need to to be done?
    $content = apply_filters( ‘wds_featured_images_from_video_filter_content’, $content, $post_id, $my_video );

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    What you’re going to want to do is something like this:

    function arunazx_get_video_content( $orig_content, $post_id ) {
        $meta_data = get_post_meta( $post_id, 'my_video', true );
        if ( ! empty( $meta_data ) ) {
            return $meta_data;
        }
    
        return $orig_content;
    }
    add_filter( 'wds_featured_images_from_video_filter_content', 'arunazx_get_video_content', 10, 2 );
    

    This will fetch the custom field that will hopefully be holding the video URL you’re intending, and if it has any content in it, return that to be what’s ultimately parsed. Otherwise, it’ll return the original values being searched.

    This would go in your active theme’s functions.php file or other place you may have for custom code.

    Thread Starter arunazx

    (@arunazx)

    hi, Thanks for the reply. After Adding this code i got the featured image but the video went missing. my theme uses video post type for displaying the videos on header.

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure what to say for that part. I don’t know of any detail of our plugin that should affect that, at least knowingly. I am curious if your theme is set up to display either a featured image or the video itself. However, I don’t know what your theme files look like to say for certain.

    Thread Starter arunazx

    (@arunazx)

    it shows videos in the header. featured image is displayed at the background and all the places where the videos are listed. Earlier(when url was accepted in post body) when a user posts the data the featured image was visible before it was approved by the admin. Now when i used this function igot the featured image in standrd version of post but in video version of the post the video went missing. You can login(https://www.cinevol.com/post-your-video/) and try to uplaod a video, that would be helpful. thanks for the replies.

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    Honestly, at this point, the focus shifts over to your theme, and not our plugin. All we do, ultimately, is parse content data for URLs, upload to the media library, and set the featured image value. We don’t handle display of that data at all.

    Thread Starter arunazx

    (@arunazx)

    hi everything works fine now. the thumb only shows in frontend when its published. in my site users can post videos. in their dashbord pending posts(un-published posts) doesnot show the thumb.
    issue screenshot: https://prnt.sc/ll9fqr
    above mentioned function worked fine ,now gets video and thumb from custom feild. thanks for the support.

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    Ahh, I easily see that making a lot of sense.

    Thanks for the followup.

    Thread Starter arunazx

    (@arunazx)

    issue screenshot: https://prnt.sc/ll9fqr.
    in my site users can post videos. in their dashbord pending posts(un-published posts) doesnot show the thumb. When url is pasted on post body thumb will appear on unpublished post also.
    can we solve this?.

    • This reply was modified 6 years, 3 months ago by arunazx.
    Thread Starter arunazx

    (@arunazx)

    Hello the issue(Video missing) is back on random posts .its due to the function we added. Im sure because when i turned the post to standard post type. only thumb is availble.
    issue: https://prnt.sc/lll4ve.

    Thread Starter arunazx

    (@arunazx)

    hello dont mind the earlier message.

    issue screenshot: https://prnt.sc/ll9fqr.
    in my site users can post videos. in their dashbord pending posts(un-published posts) doesnot show the thumb. When url is pasted on post body thumb will appear on unpublished post also.
    can we solve this?.

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    I don’t have an answer for you for this, and it’s still an issue outside of the scope of our Automatic Featured Images plugin. As long as it’s setting a featured image based on the video found/provided, our plugin has done its job.

    The issue here is how your current theme is handing content and things in various states. So you’re going to need to check out the theme files there or tap on the shoulder of someone else who has access to the files and the understanding to know what the files are doing. For what it’s worth, it may be a different plugin that is rendering all this as well, depending on what you have for a site setup.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom feild for accepting url’ is closed to new replies.