Title: php code for  nlposts
Last modified: August 21, 2016

---

# php code for nlposts

 *  Resolved [nobodyridesforfree](https://wordpress.org/support/users/nobodyridesforfree/)
 * (@nobodyridesforfree)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-for-nlposts/)
 * [nlposts] I can just put on the page or in the post, do not use it.
 * give me the php code to be inserted into the template?
 * [http://wordpress.org/extend/plugins/network-latest-posts/](http://wordpress.org/extend/plugins/network-latest-posts/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * (@iluminatus)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-for-nlposts/#post-3951692)
 * Hi, you can use shortcodes in a post or a page. When dealing with templates you
   can use the `network_latest_posts` function, check this link to find the code:
   [nlposts_templateFunction.php](https://gist.github.com/laelitenetwork/5731777)
 * Cheers.
 *  Thread Starter [nobodyridesforfree](https://wordpress.org/support/users/nobodyridesforfree/)
 * (@nobodyridesforfree)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-for-nlposts/#post-3951694)
 * excuse my ignorance.
 * if I enter this code in the template, does it work?:
 * <? php
    / / Check if the plugin Has Been activated if (function_exists (‘network_latest_posts’)){/***
   Custom Parameters Set * Those you only want to use * / $ parameters = array (‘
   title’ => ‘Recent Articles’ ‘title_only’ => ‘false’, ‘auto_excerpt’ => ‘true’,‘
   random’ => ‘true’ ); / / Execute network_latest_posts ($ parameters); } ?>
 *  Plugin Author [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * (@iluminatus)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-for-nlposts/#post-3951697)
 * Yes, but you may want to set only those parameters you’ll use. Here you’ll find
   the full list of parameters: [http://wordpress.org/plugins/network-latest-posts/other_notes/](http://wordpress.org/plugins/network-latest-posts/other_notes/)
 * For example, if you want to display 4 posts with thumbnails and excerpts per 
   page then your parameters should look like this:
 *     ```
       $parameters = array(
             'title_only'    => 'false',
             'auto_excerpt'  => 'true',
             'thumbnail' => 'true',
             'paginate' => 'true',
             'posts_per_page' => 4
       );
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php code for nlposts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/network-latest-posts_61c601.svg)
 * [Network Latest Posts](https://wordpress.org/plugins/network-latest-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/network-latest-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/network-latest-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/network-latest-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/network-latest-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/network-latest-posts/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jose Luis SAYAGO](https://wordpress.org/support/users/iluminatus/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/php-code-for-nlposts/#post-3951697)
 * Status: resolved