Title: Endpoint with custom content/template
Last modified: August 30, 2016

---

# Endpoint with custom content/template

 *  [ShMk](https://wordpress.org/support/users/shmk/)
 * (@shmk)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/endpoint-with-custom-contenttemplate/)
 * Hello,
    I have to create a plugin using endpoints (or rewrite rules) to make 
   virtual pages (not manually created in the backend) having custom content coming
   from the plugin functions.
 * I looked at ‘template_include’ filter, but this template replaces all theme html(
   header, main content, footer…) and I’m looking to make the plugin not dependant
   from theme.
 * I’ve looked also at shortcodes, but these are inserted in pages made in the backend.
 * What is the correct approach to do this?

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/endpoint-with-custom-contenttemplate/#post-6700687)
 * The correct approach is what is easiest and most intuitive for your users. From
   the options you’ve discounted I think you should consider creating custom pages
   based on your own template code when your plugin is activated. Be sure to take
   measures to avoid name collisions.
 * Then when your plugin is deleted (not just deactivated) offer the option to remove
   these posts and otherwise cleanup anything your plugin has left in the DB.
 * Is this the correct approach? I don’t know. I’ve used it a number of times without
   any problems, my clients are happy.

Viewing 1 replies (of 1 total)

The topic ‘Endpoint with custom content/template’ is closed to new replies.

## Tags

 * [content](https://wordpress.org/support/topic-tag/content/)
 * [endpoint](https://wordpress.org/support/topic-tag/endpoint/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/endpoint-with-custom-contenttemplate/#post-6700687)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
