Title: Change Post Content with Php
Last modified: August 19, 2016

---

# Change Post Content with Php

 *  [shamy1000](https://wordpress.org/support/users/shamy1000/)
 * (@shamy1000)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/change-post-content-with-php/)
 * Hey,
 *  Using `file_get_contents` and `preg_match` I have figured out how to get a part
   of an external website and display it on my site. My question is am I able to
   make the post content of each blog post be the part of the external website I
   get?
 * So for example, if I needed a tv show description, I would have the url for `
   file_get_contents` to change based on the category of the post (the tv show) 
   and custom fields (season and episode). This would then get the episode description
   of an external website and output it. I need to get this output and have it be
   the content for my post. (I could simply do this in the post template of php 
   but if the external sites content were to change, so would my post content. I
   need a way to store it in my database)

The topic ‘Change Post Content with Php’ is closed to new replies.

## Tags

 * [advanced](https://wordpress.org/support/topic-tag/advanced/)
 * [automatic](https://wordpress.org/support/topic-tag/automatic/)
 * [change](https://wordpress.org/support/topic-tag/change/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [shamy1000](https://wordpress.org/support/users/shamy1000/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/change-post-content-with-php/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
