Title: shortcode in template
Last modified: August 21, 2016

---

# shortcode in template

 *  [ryzsy](https://wordpress.org/support/users/ryzsy/)
 * (@ryzsy)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-in/)
 * nice plugin thank you…
    I would like to take it to the template file… is it possible?
 * [https://wordpress.org/plugins/news-cpt/](https://wordpress.org/plugins/news-cpt/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [vanjwilson](https://wordpress.org/support/users/vanjwilson/)
 * (@vanjwilson)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-in/#post-5114135)
 * Hi, [@ryzsy](https://wordpress.org/support/users/ryzsy/),
 * Thanks for the compliment.
 * Are you asking if you can customize the templates used to display single news
   items or archive lists of news? If you want to do that, you can do the following:
 * Copy (don’t move) the template (_single-news.php_ or _archive-news.php_) you 
   wish to customize from `/wp-content/plugins/views/` to `/wp-content/themes/<your-
   theme-name>/`. Modify the PHP and HTML of the copy in your theme folder, but 
   leave the plugin version alone. You may want to refer back to it if something
   goes wrong, or you may want to copy new features from it to your custom templates
   after a plugin update.
 * If you’re asking how to use news items in other templates or yours, you can use
   the WordPress `do_shortcode()` function. You can use `do_shortcode` to call the
   plugin’s **list-news-items** shortcode with parameters. You can find out more
   about that shortcode on the plugin’s FAQ page: [https://wordpress.org/plugins/news-cpt/faq/](https://wordpress.org/plugins/news-cpt/faq/)
 * For example,
 *     ```
       <?php do_shortcode( "list-news-items count=8 show_thumbnail=0 show_excerpt=0 category='holidays' show_date='custom' date_format='l jS F Y h:i:s A'" ); ?>
       ```
   
 * (At present, there is not a shortcode that will display a whole news item.)
 * Let me know if that answers your question.

Viewing 1 replies (of 1 total)

The topic ‘shortcode in template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/news-cpt.svg)
 * [News CPT](https://wordpress.org/plugins/news-cpt/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/news-cpt/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/news-cpt/)
 * [Active Topics](https://wordpress.org/support/plugin/news-cpt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/news-cpt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/news-cpt/reviews/)

## Tags

 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 2 participants
 * Last reply from: [vanjwilson](https://wordpress.org/support/users/vanjwilson/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-in/#post-5114135)
 * Status: not resolved