Support » Plugin: Simple Video Embedder » [Plugin: Simple Video Embedder] Add to Pages too?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m interested in this too. I’m trying to add mp4 videos to a custom post type – I suspect the process for doing this is similar for pages and custom types. Any suggestions welcome!

    I just came up against this same issue and have used the following fix.

    PLEASE NOTE: This involves a very simple edit to the plugin file itself ‘video-poster.php’ which means that should you update the plugin in future then this change will be overwritten and you’ll have to redo it. I’m not sure that’s a big issue in this scenario as the plugin has not been updated in almost and no longer appears to have an author page outside of but I thought I’d mention it upfront in case you are working on a client site and you don’t want to risk the possibility of them overwriting it with an update in future. Maybe there is someone out there who can suggest a way to implement the same change outside of the plugin file but that’s a little beyond me right now …phew, boring bit over – onto the fix.

    So open up video-poster.php in the Simple Video Embedder plugin folder and scroll down to line 143 where you will find the follow function…

    add_meta_box("p75-video-posting", "Post Video Options", "p75_videoPosting", "post", "advanced");

    this is responsible for adding the various video related fields to your post admin screen. The 5th argument passed to the function (“post”) is the part that dictates which post-type you are adding this too. So if you want also add the videos to your pages too, then you just need to make a new line below and duplicate this whole function there and edit the “post” argument on this new line to “page” instead…

    add_meta_box("p75-video-posting", "Post Video Options", "p75_videoPosting", "post", "advanced");
    add_meta_box("p75-video-posting", "Post Video Options", "p75_videoPosting", "page", "advanced");

    make sure all of this is still inside the curly brackets belonging to the ‘if( function_exists(“add_meta_box”) )’ statement above.

    I haven’t checked this personally but if you want to add the functionality to a custom post-type then it should just be a case of creating a new line with the same code above and substituting “post” for the name of your custom post-type instead.

    Hope that all makes sense.

    you could make the tweak from your functions.php

    function kia_add_meta_box(){
     if(!function_exists('p75_videoPosting')) return;
     add_meta_box("p75-video-posting", "Post Video Options", "p75_videoPosting", "page", "advanced");
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Simple Video Embedder] Add to Pages too?’ is closed to new replies.