如何在WordPress中获取特定域的iframe网址

我的WordPress WebSite帖子具有不同类型的iframe标签:例如:

<iframe src="http://examplesite1.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite2.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite3.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite4.tld/somepageordirectory"></iframe>

我需要WordPress函数来获取和替换指定(例如:examplesite3.tld)域的iframe src, 例如:

<iframe src="http://examplesite1.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite2.tld/somepageordirectory"></iframe>
<iframe src="/embed.php?ref=http://examplesite3.tld/somepageordirectory"></iframe>
<iframe src="http://examplesite4.tld/somepageordirectory"></iframe>

我是WordPress的新手。

非常感谢你的帮助, 对于我的英语非常抱歉。


#1


我们需要周围的代码来理解页面的构建方式, 而不是所显示的代码。

要执行你正在谈论的事情, 你可以使用周围的html标签并在其中回显wordpress变量, 例如:

<iframe src="<?php echo wp_function( 'variable' );?>"></iframe>

来源:

https://www.srcmini02.com/65359.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_37292.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?