Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Facebook注册插件在侧边栏中工作,但在页面正文中不工作_Facebook_Wordpress_Plugins_Registration_Sidebar - Fatal编程技术网

Facebook注册插件在侧边栏中工作,但在页面正文中不工作

Facebook注册插件在侧边栏中工作,但在页面正文中不工作,facebook,wordpress,plugins,registration,sidebar,Facebook,Wordpress,Plugins,Registration,Sidebar,在我的网站上,我可以有3个完美工作的Facebook注册插件Iframe、XFBML和HTML5版本,都来自developers.Facebook.com,问题是我希望注册表单位于注册专用页面的主体中,而不是侧边栏,但是,如果我将侧边栏中每个版本的相同代码粘贴到专用页面的内容中,它们将不起作用,任何人都不起作用,您可以在上自行查看。请注意,侧栏中的表单是文本小部件,对于专用页面,我将在页面编辑器中粘贴代码,您知道,wp admin/post.php?post=XXX&action=edit 这对

在我的网站上,我可以有3个完美工作的Facebook注册插件Iframe、XFBML和HTML5版本,都来自developers.Facebook.com,问题是我希望注册表单位于注册专用页面的主体中,而不是侧边栏,但是,如果我将侧边栏中每个版本的相同代码粘贴到专用页面的内容中,它们将不起作用,任何人都不起作用,您可以在上自行查看。请注意,侧栏中的表单是文本小部件,对于专用页面,我将在页面编辑器中粘贴代码,您知道,wp admin/post.php?post=XXX&action=edit

这对我来说毫无意义,因为登录按钮插件在其顶部的侧栏和注册页面的主体中都能完美工作,正如您在同一链接中看到的,在不工作的注册插件上方

我使用的代码是:

Iframe

  <iframe src="https://www.facebook.com/plugins/registration.php?
               client_id=XXXXXXXXXXXXX&
               redirect_uri=http%3A%2F%2Fmanuelmedina.com.mx%2Fgracias%2F&
               fields=name,birthday,gender,location,email"
          scrolling="auto"
          frameborder="no"
          style="border:none"
          allowTransparency="true"
          width="100%"
          height="330">
  </iframe>
XFBML

HTML5


我不确定哪些更详细的信息可能对你们有用,但如果有人告诉我我愿意知道。

我发现你们破坏了html代码。确保wordpress没有过滤和修改html。在Wordpress编辑器中粘贴代码后,请确保在HTML模式下执行,然后切换到视觉模式并再次返回HTML。查看“破坏的html代码”所改变的内容你是说正确的吗?即使这样,代码在侧边栏中也能完美运行,正如你在我的主页www.manuelmedina.com.mx上看到的。我刚刚尝试切换到视觉模式,然后又回到html模式,你是对的,wordpress更改了一些代码,但我直接从facebook开发者页面获取了代码,我能做什么?一种方法是创建自己的短代码并将其放在页面中,而不是直接将HTML放在页面中。
  <div id="fb-root"></div>
    <script src="https://connect.facebook.net/es_LA/all.js#appId=XXXXXXXXXXXX&xfbml=1">
    </script>

  <fb:registration
    fields="name,birthday,gender,location,email"
    redirect-uri="http://manuelmedina.com.mx/gracias/"
    width="530">
  </fb:registration>
  <div
    class="fb-registration"
    data-fields="[{'name':'name'}, {'name':'email'}, {'name':'desired_content','description':'¿Qué tipo de artículos te gustaría ver en esta página?', 'type':'text'}]"
    data-redirect-uri="http://manuelmedina.com.mx/gracias/"
  </div>