我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

从私人网站获取postdata

So, I'm using wordpress and I have a site set to private on which I have multiple advance custom fields. But when I want to call them I don't see anything unless I set the page to either public or I'm logged in as administrator.

This is my code to set up postdata

    $the_query = new WP_Query( 'page_id=1234' );
            while($the_query -> have_posts()) : $the_query -> the_post();
                    setup_postdata( $the_query );
                    do something;
            endwhile;

近期文章

  • PHP用uasort排序数组
  • Symfony 3 FOSRestBundle Twig - 不渲染
  • PHP:如何计算最大值 排列数
  • 嵌套选择数据库sql查询
  • PHP Cron作业引擎
  • 将数据类型结果从MySQL SELECT语句从varchar转换为int
  • 如何在Wordpress中覆盖插件类的功能?
  • 存储段落
  • 有没有办法让一个对象在调用某个函数后调用一个函数?
  • 数组shuffle重复值
  • 如何将以下CURL调用转换为C#
  • 如何在本地计算网页上的社交分享数量
  • Wordpress get_posts()类别参数问题
  • 在php文件中的fullcalendar,javascript和php
  • 通过Laravel返回Javascript文件
  • 在codeigniter中使用jQuery ajax方法获取数据
  • 我怎么能刷新下面的php文件? (没有页面重新加载)
  • 在HTML div中显示文件夹中的所有文本文档?
  • include_once无法打开流:没有这样的文件或目录 - Wordpress [复制]
  • 列名称中的单引号 - 如何选择值

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华