Developer Notes
To republish stories from and/or contribute stories to the Newswire, your WordPress site must meet the following criteria:
- The NC State Newswire plugin should be activated
- Your site should be running at least WordPress 4.7
To republish stories from the Newswire, the plugin settings will need to be configured within Settings -> Newswire Settings.
Downloading the Plugin
A compiled version of the plugin can be downloaded, or you can clone and compile the code from GitHub. After cloning the repo, run “composer install” to compile the code.
The plugin is also available through ITECS’ Cthulhu plugin/theme repository system.
Becoming a Contributor
To become a contributor to the Newswire, you will need to identify a category that you would like the Newswire to pull stories from. By only pulling stories from a specific category, you can self-curate which stories will be of interest to the campus community at large. When you are ready to become a contributor, please email ucomm@help.ncsu.edu with the slug of the category. The developers within University Communications will work with you and/or your technical support member(s) to have the Newswire pull in your stories.
Theme Support
Posts republished through the Newswire should work out of the box with most WordPress themes. The Newswire copies the post title, post content, post excerpt, and featured image. It does not currently tag or categorize implemented stories.
Given that standard WordPress fields are used, most issues that are encountered are likely to be related to styling. Even then, if a theme supports common CSS classes such as “alignleft,” “alignright,” etc., little additional theme edits are likely to be necessary.
If you do run into issues, please email ucomm@help.ncsu.edu. University Communications can provide basic troubleshooting with most themes. Commonly encountered issues will be added to this page to help others who are implementing the Newswire on their sites.
How the Plugin Affects Your WP Install
Posts are imported from the main Newswire server through a REST JSON API. An imported post is added to your site as a standard WordPress post. In addition to post title, post content, post excerpt, and featured image, additional custom fields will be set when a post is imported. These custom fields primarily hold metadata that the Newswire plugin uses to manage a post.
Upon plugin activation a “Staff” user is added to your site with the email address of “newswire@ncsu.edu.” By default imported posts will be attributed to this author. However, the plugin first checks to see if your site has a user with the same email address of the original author. If it finds a match, that user will be the post’s author. For generically attributed posts, you can change the user’s name from “Staff,” but you will need to keep “newswire@ncsu.edu” as the user’s email address.
Bugs and Feature Requests
Bugs and feature requests can be submitted to ucomm@help.ncsu.edu or they can be submitted as an issue on the plugin’s GitHub repository. Pull requests are welcome and will be considered for merging; however, you may want to discuss complex pull requests within an issue prior to submitting code for merging.