How can I get Featured Video link with WordPress API

Posted in: Newspaper
Post count: 11

Hi, I’m using WordPress API to query wordpress post to another site,

Here is my question

How can I get the “Featured Video Link” that put inside the content so I can put it in the api response like

"embed":[
"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/-VeUJXAlU_A\" frameborder=\"0\" allowfullscreen></iframe>",
"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/-VeUJXAlU_A\" frameborder=\"0\" allowfullscreen></iframe>",
],

My Second question is

How can I know what post template that each content is using? the purpose is I want to group content that use post that using video template and normal template (just use feature image not embed video link)

Post count: 23312

Hello r_patchra,

For your first question, notice that our theme has not been tested with this such a plugin and we do not know the theme behavior with this plugin, sorry! For more information about Feature image and video theme functionality, please check the following documentation from here -> https://forum.tagdiv.com/featured-image-or-video/

For your second question, notice that you can set up which post template is used for your posts. If is not what you mean, provide more details so I will be able to provide a more accurate response.

Thanks for your understanding!

Post count: 11

Hey! Thanks for your reply. For the first question, I did not use any of the external plugin. I will give you some use case so you might get in more detail.

For example, in newspaper theme there are such many of the post template and the post template number 1, 2, 9, 10, 11 is the template for Video Format. In my case I will put some youtube link and then the theme will generate the thumbnail and display the youtube video on top of the post. My question is if I want to query the post via wordpress api how can I get the youtube link with the response? I know that in this case we need some of custom code but I dont know how to get the link out.

For my second question, from the case above. Some of the content is Video Format but some is just use normal feature image. So How can I know which of the post use Video Format? so I can group post that use video out.

Thanks!!!

Post count: 23312

hello r_patchra,

Unfortunately, the theme does not have any such a functionality and as you want to do, involves doing such custom work and we cannot provide something like this at the moment, sorry! As a hint, if you will check the theme core file here -> https://www.screencast.com/t/VG9xjtikg you will see the YT case where the query is made and therefore if you are not aware of the steps which are needed to take in this case, please consider hiring a freelancer/developer to help you because we cannot provide additional customizations at the moment, sorry!

Thanks for your uynderstanding!

Post count: 11

Yeah!! Thanks for your hint!!, it’s work!!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.