[英]Wordpress Display Content in Sidebar on Specific Post/Pages
I am not sure exactly what I am looking for in the api so I'm going to ask here. 我不确定在api中到底要寻找什么,因此我将在这里询问。 On a post/page, I want the ability to have a piece of text display on the sidebar ONLY that content.
在帖子/页面上,我希望能够仅在侧边栏上显示一段文本。 The content to be display is to be set as an attribute or something similar in the edit area of that post only.
仅在该帖子的编辑区域中将要显示的内容设置为属性或类似内容。
Is there a way of doing this and where do I look in the api? 有没有办法做到这一点,我在api的哪儿看?
Using a text widget as already mentioned, you can use the Widget Logic plugin and use an if statement to display that widget only on the post you want. 如前所述,使用文本窗口小部件,您可以使用窗口小部件逻辑插件,并使用if语句仅在所需的帖子上显示该窗口小部件。
http://wordpress.org/extend/plugins/widget-logic/ http://wordpress.org/extend/plugins/widget-logic/
If you are looking for logic to do this here it is: 如果您正在寻找执行此操作的逻辑,则为:
A good starting point for this can be this tutorial which does show twitter or facebook posts based on custom variable on post. 为此的一个很好的起点可以是本教程 , 该教程的确根据帖子中的自定义变量显示Twitter或Facebook帖子。
您可以使用此插件,然后选择页面,帖子类型或什至用逗号分隔的帖子ID列表http://wordpress.org/plugins/display-widgets/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.