Showing videos in your News app

Yes, you can definitely have video players working in your app. Chances are your videos are currently added to your content in one of these two ways:

1) Videos added directly into your content

If you manually add videos to your posts or pages using embed codes from sites like Youtube or Vimeo, then these will be available in your app out of the box. If you’re using a plugin that allows you to add videos using shortcodes, these will be interpreted by MobiLoud and shown in your app. No work on your end will be required.

2) Videos added using custom fields or through a theme

If you add your videos by copy-pasting a URL in a special section of your post “Edit” screen, created by your theme, or in a custom field that your template then reads and presents on your website, then some work will be required to get the videos to show in your app.

No worries, nothing complicated if you have some experience coding a WordPress template. You’ll just need some PHP code to read the contents of your custom fields and add the appropriate embed code to your article screen. You can add this code to your app using our editor.

From the “Settings” / “Editor” page in the plugin, choose an appropriate location for your videos (generally “PHP above the contents” works well), then add the code required to pull the video ID from the custom field used by your template (you can generally find this by inspecting your theme’s code for single pages, at single.php within your template folder) and embed the video with the appropriate player (Youtube, Vimeo, etc.).

If you don’t know how to do this, our developers can do the work for you at no charge, just contact us at [email protected] or using the form below.

Related Articles