Title: Feature request: template
Last modified: August 21, 2016

---

# Feature request: template

 *  [fchastanet](https://wordpress.org/support/users/fchastanet/)
 * (@fchastanet)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/feature-request-template/)
 * Hello,
 * Thanks for your usefull widget
    I have made an upgrade to be able to templatize
   the output here the changes I have made in rp-news-ticker-front.php in the function
   display_frontend
 *     ```
       /**
                * Widget Output Begins
                *----------------------------------------------------*/
               // use a version of the widget template from the theme if it exists
               // otherwise, use the default widget template from the plugin folder
               $fpw_template = locate_template( 'rp_news_ticker_template/rpnt_default.php', false, true );
   
               foreach($myposts as $post){
                   setup_postdata($post);
                   if( $fpw_template ) {
                      require( $fpw_template );
                   } else {
                      require( plugin_dir_path( __FILE__ ) . 'rp_news_ticker_template/rpnt_default.php' );
                   }
                   $in_categories[] = $result;
               }
               $alldata = array();
       ```
   
 * and here you actual template in the directory of your plugin, file rp_news_ticker_template/
   rpnt_default.php
 *     ```
       <?php
       $result = sprintf('<li><span>%s</span><a href="%s">%s</a></li>',
           apply_filters('the_time', get_the_time($options['date_format']), $options['date_format']),
               apply_filters('the_permalink', get_permalink()), stripslashes(the_title('', '', false))
       );
       ```
   
 * here my template in my theme folder, file rp_news_ticker_template/rpnt_default.
   php
 *     ```
       <?php
       $result = sprintf('<li>%s</li>',
               stripslashes(the_title('', '', false))
       );
       ```
   
 * thanks again
    François Chastanet
 * [http://wordpress.org/plugins/rp-news-ticker/](http://wordpress.org/plugins/rp-news-ticker/)

The topic ‘Feature request: template’ is closed to new replies.

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

 * 0 replies
 * 1 participant
 * Last reply from: [fchastanet](https://wordpress.org/support/users/fchastanet/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/feature-request-template/)
 * Status: not resolved