Title: Create a shortcode
Last modified: June 23, 2017

---

# Create a shortcode

 *  [Michael1799](https://wordpress.org/support/users/michael1799/)
 * (@michael1799)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/create-a-shortcode-2/)
 * Hey Everyone,
 * Just a simple question, how do I create a shortcode to display a form on a page?
 * I’ve written the form code in php & html & have uploaded the plugin files, all
   I need to do is write the shortcode.
 * What I have so far is;
 * function add_contact_form() {
    return ” here is all the form code “; }
 * add_shortcode(‘add_contact_form’);
 * What am I missing?
    Thanks in advance.

The topic ‘Create a shortcode’ is closed to new replies.

## Tags

 * [contact-form](https://wordpress.org/support/topic-tag/contact-form/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 0 replies
 * 1 participant
 * Last reply from: [Michael1799](https://wordpress.org/support/users/michael1799/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/create-a-shortcode-2/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
