[英]Pass URL query string parameters from page to iFrame in Wordpress
I have a Wordpress page on http://example.com/demo
. 我在http://example.com/demo
上有一个Wordpress页面。 If I attach some URL query string parameters, like http://example.com/demo?param1=123¶m2=456
, I get a 404 error on Wordpress. 如果我附加了一些URL查询字符串参数,例如http://example.com/demo?param1=123¶m2=456
,则会在Wordpress上收到404错误。 I need those params only to put them on an iFrame URL, I don't need to do anything with them inside Wordpress. 我只需要将这些参数放在iFrame URL上,就无需在Wordpress中对它们进行任何处理。 Do you have any ideas on how I can pass them? 您对我如何通过它们有任何想法吗?
You are getting an 404 error because of your permalink structure. 由于您的永久链接结构,您收到404错误。 You need to save the permalinks as post name
instead of plain
. 您需要将永久链接另存为post name
而不是plain
post name
。 To change the permalinks : Go to Settings->Permalinks->Change to post name->Save
更改永久链接:转到Settings->Permalinks->Change to post name->Save
After than you can pass the variables to the URL as GET
parameters. 之后,您可以将变量作为GET
参数传递到URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.