Title: load external file in plugin
Last modified: August 20, 2016

---

# load external file in plugin

 *  [Remco DG](https://wordpress.org/support/users/remco-dg/)
 * (@remco-dg)
 * [15 years ago](https://wordpress.org/support/topic/load-external-file-in-plugin/)
 * Hi,
    I’ve written a very simple plugin to replace a variable with a price:
 *     ```
       function the_price_thing($cursuscode){
       $cursuscode = str_replace('TAANNEM-prijs', '339 €', $cursuscode);
       return $cursuscode;
       }
   
       add_filter('the_content', 'the_price_thing');
       ```
   
 * The list is a lot longer and is used in several websites.
    Now I would like to
   use the same function, but place the list on an external domain, so I only have
   to update it once. I’ver tried different ways to include the txt or php file 
   into the function, but nothing works for me.
 * All suggestions welcome!!!

The topic ‘load external file in plugin’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [Remco DG](https://wordpress.org/support/users/remco-dg/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/load-external-file-in-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
