WP Kit CN Doc

中文版

Under Construction...

Template Tags Reference

This section will give you a detailed reference of the template tags in WP Kit CN. All the tags appear in the same style, begin with "wkc", and all the parameters will pass through strings.

wkc_recent_comments

This tag will display a list of recent comments. Accepted parameters are:

  • number——the number of comments to display, 5 is the default.
  • before——html tags used before a list item, lt;li> is the default.
  • after——html tags used after a list item, </li> is the default.
  • showpass——show comments of password protected post or not, 0 is the default(means not to display), 1 is the alternative.
  • length——how many words will be showed in one comments, 50 is the default.
  • skipuser——skip some user's comments, admin is the default value. Leave it blank means show all users' comments.
  • echo——directly print the result on the page or just return the raw query result. 1 is the default value(means print it out), 0 is the alternative.

Example:

<?php //Show 10 comments, each contain 30 words, skip the user Charles' comments ?>
<?php wkc_recent_comments('number=10&length=30&skipuser=Charles'); ?>

wkc_recent_pings

This tag show a list of recent pings. Accepted parameters are:

  • number——the number of comments to display, 5 is the default.
  • before——html tags used before a list item, lt;li> is the default.
  • after——html tags used after a list item, </li> is the default.
  • showpass——show pings of password protected post or not, 0 is the default(means not to display), 1 is the alternative.
  • type——pings type, can be 'both', 'pingback' or 'trackback'.
  • nopings——the text will be displayed when no pings exists.
  • echo——directly print the result on the page or just return the raw query result. 1 is the default value(means print it out), 0 is the alternative.

Example:

<?php //show 10 trackbacks ?>
<?php wkc_recent_pings('number=10&type=trackback'); ?>

Leave a Reply

无觅相关文章插件,快速提升流量