WordPress.org

Ready to get started?Download WordPress

Forums

Featured Video
Adding Featured Video Functionality To Custom post Types (12 posts)

  1. sarthakgupta101
    Member
    Posted 2 years ago #

    I have added this to the normal blog posts and it works like a charm, however would like to know how to add this feature to custom post types say 'NEWS'.

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

  2. LucP
    Member
    Plugin Author

    Posted 2 years ago #

    I'm afraid you are going to have to go into the code...
    The plugin checks if you are trying to add it to a custom post type or just a post..

    But it's a good feature request for the future...

  3. ChristinaHooper
    Member
    Posted 1 year ago #

    Has this been added yet, or were you able to accomplish it?

    If not, I would be happy to modify the code to include these feature... any pointers on where to start?

  4. ChristinaHooper
    Member
    Posted 1 year ago #

    Lol... nvm... that was a lot easier to do than I was thinking it would be.

    For anyone else that needs it, in featured-video.php, in the fv_meta_regiester function, it has this:

    add_meta_box('fv_meta', 'Featured video', 'fv_meta_html', 'post', 'side', 'low');

    You just add this for each custom post type you have
    add_meta_box('fv_meta', 'Featured video', 'fv_meta_html', 'CUSTOM POST NAME GOES HERE', 'side', 'low');

  5. ibcreative
    Member
    Posted 1 year ago #

    Hi, i was working this too and found that your solution is right but incomplete. It only manages to show the form on the custom post admin view but it doesn't actually save the data.

    I got it working by adding: if(isset($_GET['customposttypename'])){
    $post_id = $_GET['customposttypename'];
    }

    to the fv_meta_html function in the plugin file just below if(isset($_GET['post'])){
    $post_id = $_GET['post'];
    }
    and before the else part.

  6. ChristinaHooper
    Member
    Posted 1 year ago #

    I was just working on that part... thanks for the help!

  7. ibcreative
    Member
    Posted 1 year ago #

    No problem, please let me know if you find anything else regarding this functionality. Thanks

  8. ChristinaHooper
    Member
    Posted 1 year ago #

    I've actually run across one thing I can't seem to fix... I need to add ?wmode=transparent to the end of the src url so that the videos will respond to z-index settings.

    Right now I have a gallery with a mix of featured video and image, and I use the lightbox plugin on the images... when I click an image and it comes up in the lightbox, the video is on top of the lightbox. So I need to get that transparent setting into the src to fix it.

  9. ibcreative
    Member
    Posted 1 year ago #

    well i think i may have found the solution, i just appended the wmode to the link in the line:

    echo '<iframe width="'.$width.'" height="'.$height.'" src="http://www.youtube.com/embed/'.$id.'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';

    BUT, the trick is that for some reason i had to make the change in the built in WordPress plugin editor, it didn't work otherwise...

  10. ChristinaHooper
    Member
    Posted 1 year ago #

    I tried to make that same change over and over and over again in ftp and it wouldn't work. I didn't think to try the WP editor. I'll give that a try. Thanks again!

  11. LucP
    Member
    Plugin Author

    Posted 1 year ago #

    Hey, the new version automatically works with every custom post type. plus the wmode can be set now. Thanks for the inspiration!

  12. ChristinaHooper
    Member
    Posted 1 year ago #

    Awesome! Thank-you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic