站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Template Tags/get links
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Xxf3325
(
讨论
|
贡献
)
2008年6月27日 (五) 10:37的版本
(新页面: {{Deprecated}} == Description == Like
wp_get_links()
, this tag displays links from the
WordPress:Links Manager
, but allows the user to contro...)
(差异) ←上一版本 |
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{Deprecated}} == Description == Like [[WordPress:Template_Tags/wp_get_links|wp_get_links()]], this tag displays links from the [[WordPress:Links Manager]], but allows the user to control how they are displayed by tag parameters, rather than through the WordPress admin interface (useful when displaying links on more than one template). This tag does ignore any link where the Visible property is set to No. == Replace With == [[WordPress:Template_Tags/wp_list_bookmarks|wp_list_bookmarks()]]. == Usage == %%% <?php get_links(category, 'before', 'after', 'between', show_images, 'order', show_description,show_rating, limit, show_updated, echo); ?> %%% == Examples == ===Default Usage=== By default, the usage shows: * All links * Line breaks after each link item * An image if one is included * A space between the image and the text * Sorts the list by name * Shows the description of the link * Does not show the ratings * Unless limit is set, shows all links * Displays links as links not text <?php get_links(); ?> === Specific Category Sorted by URL === Displays links for link category ID 2 in span tags, uses images for links, does not show descriptions, sorts by link URL. <?php get_links(2, '<span>', '</span>', '', TRUE, 'url', FALSE); ?> === Shows Ratings and Timestamp === Displays all links in an ordered list with descriptions on a new line, does not use images for links, sorts by link id, shows description, show rating, no limit to the number of links, shows last-updated timestamp, and echoes the results. <ol> <?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', TRUE, TRUE, -1, TRUE, TRUE); ?> </ol> == Parameters == ; category : (''integer'') The numeric ID of the link category whose links will be displayed. Display links in multiple categories by passing a string containing comma-separated list of categories, e.g. "4,11,3". If none is specified, all links are shown. Defaults to <tt>-1</tt> (all links). ; before : (''string'') Text to place before each link. There is no default. ; after : (''string'') Text to place after each link. Defaults to <tt>'<br />'</tt>. ; between : (''string'') Text to place between each link/image and its description. Defaults to <tt>' '</tt> (space). ; show_images : (''boolean'') Should images for links be shown (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). Defaults to <tt>TRUE</tt>. ; order : (''string'') Value to sort links on. Defaults to <tt>'name'</tt> unless you pass the value of <tt>''</tt> (empty), in which case it sets to <tt>'id'</tt>. Valid options: :* <tt>'id'</tt> :* <tt>'url'</tt> :* <tt>'name'</tt> :* <tt>'target'</tt> :* <tt>'category'</tt> :* <tt>'description'</tt> :* <tt>'owner'</tt> - User who added link through Links Manager. :* <tt>'rating'</tt> :* <tt>'updated'</tt> :* <tt>'rel'</tt> - Link relationship (XFN). :* <tt>'notes'</tt> :* <tt>'rss'</tt> :* <tt>'length'</tt> - The length of the link name, shortest to longest. : '''Prefixing any of the above options with an underscore (ex: '''<tt>'_id'</tt>''') sorts links in reverse order.''' :* <tt>'rand'</tt> - Display links in random order. ; show_description : (''boolean'') Should the description be displayed (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). Valid when '''show_images''' is <tt>FALSE</tt>, or an image is not defined. Defaults to <tt>TRUE</tt>. ; show_rating : (''boolean'') Should rating stars/characters be displayed (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). Defaults to <tt>FALSE</tt>. ; limit : (''integer'') Maximum number of links to display. Defaults to <tt>-1</tt> (all links). ; show_updated : (''boolean'') Should the last updated timestamp be displayed (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). Defaults to <tt>FALSE</tt>. ; echo : (''boolean'') Display links (<tt>TRUE</tt>) or return them for use PHP (<tt>FALSE</tt>). Defaults to <tt>TRUE</tt>. == Related == {{Tag Link Manager Tags}} {{PHP Function Tag Footer}}
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
模板:PHP函数标签页底文字
(
编辑
)
模板:取消的
(
编辑
)
模板:标签链接管理器标签
(
编辑
)