Title: Where to add function code?
Last modified: August 20, 2016

---

# Where to add function code?

 *  Resolved [eraleks](https://wordpress.org/support/users/eraleks/)
 * (@eraleks)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/)
 * Hi everyone!
 * I’ve been reading many places about a function ( get_last_updated() ) that in
   some way makes it possible to have a page on the main blog of the network show
   all new posts on all the blogs on the network.
 * The only problem is: I can’t find anywhere that explains where I shall put this
   code… Any help? And when I finally have added the code to the right place, how
   do I use it?
 * What I’m trying to do is have the front page of the “mother blog” on the network,
   to show new posts from all other blogs on my network.
 * Any help?

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

 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2250901)
 * You have to place it in a template file, like home.php in your theme.
 * You may find it more useful to just use already built widgets that use this function
   to show the same thing.
 * [http://wordpress.org/extend/plugins/diamond-multisite-widgets/](http://wordpress.org/extend/plugins/diamond-multisite-widgets/)
 *  Thread Starter [eraleks](https://wordpress.org/support/users/eraleks/)
 * (@eraleks)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2250907)
 * Interesting… I’ve been searching the net for hours and hours and didn’t find 
   that plug-in! Nice, thanks!
 * But, it’s not spot on what I want. I want all the posts to come up the same way
   as when you post posts to your own blog. To fill the entire front page. Is this
   possible?
 * Do you have any other tips on good plug-ins?
 * I found a plug-in that let users add themselves to blogs after they’ve registered
   on the mother-blog, but it didn’t work properly. This is something I could really
   use. Do you have tips for plug-ins etc that can do this sort of things?
 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2250928)
 * > But, it’s not spot on what I want. I want all the posts to come up the same
   > way as when you post posts to your own blog. To fill the entire front page.
   > Is this possible?
 * that function you were looking at earlier wouldn’t do what you want either. 😉
 * If you want all posts like that, use this:
 * [http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/](http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/)
 * you may want do dig around my archives at [http://wpmututorials.com](http://wpmututorials.com)
 *  Thread Starter [eraleks](https://wordpress.org/support/users/eraleks/)
 * (@eraleks)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2250930)
 * Fantastic!
    That plug-in seems to really do the job =) Thanks a lot for your 
   help!
 * But if you don’t mind a need help with 1 more thing. I’m quite new to wordpress
   and don’t know nothing about coding :/
 * On the set-up it says: “Create posts in your main blog. All posts will appear
   on the front page of your site. Remember to to add a post loop to home.php in
   the theme directory if it exists.”
 * How do I add a post loop to home.php? That didn’t tell me anything 😛
 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2251022)
 * Ignore that part. you do not need to do it. its old instructions based on the
   assumption you were using an older theme that came by default.
 * In other words, your theme likely does not have a home.php, right Then no worries.
 *  Thread Starter [eraleks](https://wordpress.org/support/users/eraleks/)
 * (@eraleks)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2251023)
 * It works!! I love you right now…
    The plug-in created a new site called tags 
   for the blog archive. Is this good or bad? I could also put it in the main blog?
 * Thanks so much for invaluable help!
 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2251030)
 * > The plug-in created a new site called tags for the blog archive. Is this good
   > or bad?
 * that’s what it is supposed to do unless you tell it to use the main blog. Your
   call.
 *  Thread Starter [eraleks](https://wordpress.org/support/users/eraleks/)
 * (@eraleks)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2251242)
 * Strange thing happend here… Suddenly it doesn’t work anymore. I’ve done much 
   with the site since last time though. When I create a new post on some of the
   sub-blogs, nothing happens on the mainpage :/ Any sugestions?

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

The topic ‘Where to add function code?’ is closed to new replies.

## Tags

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

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 8 replies
 * 2 participants
 * Last reply from: [eraleks](https://wordpress.org/support/users/eraleks/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/where-to-add-function-code/#post-2251242)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
