WordPress - FlickrRSS、Flickr Gallery - 两者都不起作用
我已经被这个最简单的问题难住了好几个小时,向 StackOverflow 的朋友求助:)
基本上,我正在开发一个自定义 WordPress 主题。我使用的代码与之前多次使用过的八面“FlickrRSS”插件的代码相同。代码如下所示:
<?php
get_flickrRSS(
array(
'set' => '72157625440574627',
'num_items' => 20,
'type' => 'set'
)
);
?>
问题(很难解决)是我从上面的代码中得到绝对零返回。到目前为止,我尝试过不同的用户和不同的照片集,但没有成功。
由于无法调试而感到沮丧,我尝试了另一个插件“Flickr Gallery”插件,它也具有很高的评级。使用这个画廊的短代码我再次一无所获。
我想也许我的服务器以某种方式重置为 PHP 4,但事实并非如此,它设置为 PHP 5。
另外,我想到它可能是 WordPress 3.03。该网站是我使用 WordPress 3.03 开发的唯一一个网站。
我完全被难住了。有人见过这个问题,甚至有调试建议吗?我会尝试任何事情(只要我还没有尝试过)。
I have been stumped by this simplest problem for hours now, turning to my friends at StackOverflow :)
Basically, I'm developing a custom WordPress theme. I'm using the same code that I have used many times before from EightFaces "FlickrRSS" plugin. Code looks like this:
<?php
get_flickrRSS(
array(
'set' => '72157625440574627',
'num_items' => 20,
'type' => 'set'
)
);
?>
The problem (which is very difficult to troubleshoot) is that I get absolutely ZERO return from the above code. So far I have tried different users and different Photo Sets, with no luck.
Frustrated by being unable to debug, I tried a different plugin the "Flickr Gallery" plugin which has high ratings also. Using the shortcodes for this gallery I again get ABSOLUTELY NOTHING.
I thought that perhaps my server somehow got reset to PHP 4, but that's not it, it's set for PHP 5.
Also, occurred to me that it might be WordPress 3.03. This site is the only one of those I've developed using WordPress 3.03.
I'm totally stumped. Anyone out there seen this problem or even have suggestions for debugging? I'll try anything (as long as I haven't tried it already).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
数组设置正确,但我认为您的“set”值错误。
我浏览了您的用户个人资料,找到了您的网站,并从那里找到了您的 Flickr 帐户。当我导航到 http://www.flickr.com/photos/brianfeister/sets/ 时72157625440574627/ 我收到 404。
要么您设置的号码错误,要么您将其设置为私人或其他。
编辑:
花了一段时间,但我找到了问题所在。
根据插件附带的自述文件,只有当“type”设置为“user”或“group”时才需要“id”字段,但事实证明“set”也需要它。
如果我运行这个:
我什么也得不到,但如果我添加“id”字段(即拥有该集合的用户的“id”,而不是您的“id”):
它可以工作。
The array is setup properly, but I think you have the wrong value for "set".
I went through your user profile, found your site, and from there I found your Flickr account. When I navigate to http://www.flickr.com/photos/brianfeister/sets/72157625440574627/ I get a 404.
Either you have the wrong set number, or you have it set to private or something.
Edit:
It took a while, but I figured out the problem.
According to the README file that comes with the plugin, the 'id' field is only needed when 'type' is set to 'user' or 'group', but it turns out that it's needed with 'set' as well.
If I run this:
I get nothing, but if I add the 'id' field (i.e. the 'id' for the user owning the set, not your 'id'):
It works.