Title: First CPT &#8211; Basic Question
Last modified: August 31, 2016

---

# First CPT – Basic Question

 *  Resolved [nickp8020](https://wordpress.org/support/users/nickp8020/)
 * (@nickp8020)
 * [10 years ago](https://wordpress.org/support/topic/first-cpt-basic-question/)
 * In my very first CPT plugin, I tried
 *     ```
       add_filter('the_content', 'my_fun');
       ```
   
 * and
 *     ```
       function my_fun($content){
       print_r($content); // Returns blank ???
       }
       ```
   
 * Should $content be blank? Doesn’t it suppose to return data like `get_page( $
   page_id );`

Viewing 1 replies (of 1 total)

 *  Thread Starter [nickp8020](https://wordpress.org/support/users/nickp8020/)
 * (@nickp8020)
 * [10 years ago](https://wordpress.org/support/topic/first-cpt-basic-question/#post-7234824)
 * Had to place it in the loop
 *     ```
       while (have_posts()){
                                                       the_post();
                                                       the_content();
                                                   }
       ```
   
 * Got resolved 🙂

Viewing 1 replies (of 1 total)

The topic ‘First CPT – Basic Question’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [nickp8020](https://wordpress.org/support/users/nickp8020/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/first-cpt-basic-question/#post-7234824)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
