Wheaton College Norton, Massachusetts
Wheaton College
Web

get-news shortcode

The "get-news" shortcode can be used to pull in a list of news posts from the current site, or a different Wheaton site.

Usage:

[  get-news  ]

The above shortcode will pull in the 5 most recent posts with the category "news", sorted by date (descending).

Advanced usage:

[  get-news site_name="news" numberposts="10" show_dates="0"  ]

Several options are available for this shortcode:

Attribute Default value Description
category_name news The name of the category to display. Optional.
heading false A heading to display before the list of posts.
<h3>{heading}</h3>
listclass post-list A class to assign to the list tag (<ul>).
listid null An ID to assign to the list tag (<ul>).
numberposts 5 The number of posts to display.
orderby date Posts will be sorted by this field.
Other options.
order desc Designates the ascending or descending order of the ORDERBY parameter. Possible values include "desc" and "asc".
show_authors false Display authors or not.
<span class="post-author">By {authorname}</span>
show_dates true Display dates or not.
<span class="post-date">May 1, 2012</span>
show_excerpt true Show the excerpt or not.
<div class="post-excerpt">{excerpt}</div>
show_fulltext false Show the full text of the post or not.
<div class="post-text">{full text}</div>
show_more_link true Show the "More" link or not.
<div class="post-more">{show_more_text</div>
show_more_text More » The text of the "More" link; shown if show_more_link is true.
show_titles true Show post titles or not.
<h4><a class="post-title" href="{link}">{post title}</a></h4>
site_id ID of current site The numeric ID of the site to pull news from.
The default is the ID of the current site.
site_name null The path to the site to pull news from.
This is the first part of the site's URL. So, to pull from http://wheatoncollege.edu/news/, the correct value for site_name is "news". This overrides site_id above.
tag null Gets news by tag(s).
Example: tag=headline will grab all posts that have been tagged "headline".
More options.
thumbnails small Display post thumbnails or not.
Options are: small, medium, full, none.
offset 0 Skip this many posts.

For more information about this shortcode, please contact web@wheatoncollege.edu.

Comments are closed.

css.php