Simple Video Embedder
Add to Pages too? (4 posts)

  1. creativelevity
    Posted 4 years ago #

    I am wondering if there is an easy fix to make this work on pages too?



  2. shellyd
    Posted 4 years ago #

    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!

  3. Inmo
    Posted 4 years ago #

    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 wordpress.org 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.

  4. helgatheviking
    Posted 4 years ago #

    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");

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Video Embedder
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic