开发者

How to extract postimage url from wordpress post?

开发者 https://www.devze.com 2023-01-20 17:41 出处:网络
Hey guys. So my question is just like in the title. How to extract postimage url from wordpress post? So for example if wordpress postimage() function outputs something like:

Hey guys. So my question is just like in the title. How to extract postimage url from wordpress post? So for example if wordpress postimage() function outputs something like:

开发者_Go百科
<img src="some_img_url.jpg">

I'm only interested in some_img_url.jpg.


The question sounds quite vague like this (to me at least), but at first glance – and if it's a quick client side solution that you're looking for(?) – I'd try using jQuery, more specifically the .attr() method. See the last example of the official documentation, for example: http://api.jquery.com/attr/

0

精彩评论

暂无评论...
验证码 换一张
取 消