WordPress.org

Support

Support » Plugins and Hacks » [Resolved] set featured video from frontend

[Resolved] set featured video from frontend

  • csaicharan
    Member

    @csaicharan

    I am using my own frontend to create posts in wordpress…
    Actually i am able to set featured image from my own front end (which i was designed ).. and my requirement is to set featured video in the place of image.. so that decided to set use this plugin ( Featured Video Plus ).. please help me to set featured video from my own front end….

    http://wordpress.org/extend/plugins/featured-video-plus/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alex
    Participant

    @ahoereth

    Um I know nothing about your implementation. So lets assume you just want an <input type="text"> on your frontend to pass an video url to the plugin and save it as featured video. Remember that you still need an featured image to be specified.

    I think the simplest way would be to pass your url to the plugin using jQuery & AJAX. WordPress handles all ajax requests through admin-ajax.php in the backend, even if the request is sent from the frontend. This way you do not need to include any of the plugin files on the frontend.

    $.post( ajaxurl, {
    	'action'    : 'fvp_ajax',
    	'id'        : $('#post_ID').val(),
    	'fvp_nonce' : $('#fvp_nonce').val(),
    	'fvp_video' : $('#fvp_video').val(),
    	'fvp_sec'   : $('#fvp_sec').val()
    });

    ajaxurl needs to be specified before, it is just available in the backend by default. Use admin_url('admin-ajax.php'). fvp_nonce needs to be generated by wp_create_nonce('fvp_nonce'). You can use wp_nonce_field for it. id is the posts id you want the video to add to, fvp_video is the url, fvp_sec the (optional) fallback video url.

    I have no idea how skilled you are with WordPress, this is just a rough mockup of the way I would approach it. This wasn’t tested! Still, hope I could help,
    Alex

    csaicharan
    Member

    @csaicharan

    Thanks For Your Detailed response.. I Will be Working on it…
    Your Assumption is right…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] set featured video from frontend’ is closed to new replies.