Title: Help creating first plugin
Last modified: August 19, 2016

---

# Help creating first plugin

 *  [astereo](https://wordpress.org/support/users/astereo/)
 * (@astereo)
 * [18 years ago](https://wordpress.org/support/topic/help-creating-first-plugin/)
 * Hello all. I’m trying to create my first plugin – a plugin version of [my market theme](http://www.astereostudio.com/revive/showcase/market-for-wordpress-the-theme).
   I have never created a plugin before and I’m not good with php (other than wordpress
   stuff), but I do know how to read tutorials. I’ve found plenty that show you 
   how to add additional content to the end / beginning of a post (such as a sentence
   wrapped in paragraph tags), but I need something a little beyond that.
 * What I want to do is have a `<form>` code generated and added to the end of each
   post which will lead to a paypal buy now button. Everytime I try putting a form
   code in place of the paragraph tags from tutorials, it causes the plugin to break
   and it obviously doesn’t get activated. I’m not sure if this is just because 
   it won’t accept the form code, or because I am using custom fields in the form
   code (one echos the price set in a custom field to set the buy now button price,
   email email is called from the admin email specified in wordpress, etc).
 * Can this be done and can anyone point me in the right direction? If not, I’ll
   gladly pay someone to do it if they are interested.
 * Please let me know as soon as possible.
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [pipelineae](https://wordpress.org/support/users/pipelineae/)
 * (@pipelineae)
 * [18 years ago](https://wordpress.org/support/topic/help-creating-first-plugin/#post-711463)
 * Since the form tag obviously has attributes set, are you using the correct quotes(
   ie: ” and ‘).
 * You need to alternate them in php. Like this:
    `echo '<form action="something.
   php">';` However, if you try something like the following, php will error: `echo'
   <form action='something.php'>';` In the 2nd example, the parser gets to the second
   apostrophe and thinks the echo is finished, but there’s no semicolon so it errors.
 * If you are left in a situation where you HAVE to use the same quote that you 
   used to open the echo, escape it with the backslash, that way php knows to ignore
   it.
    `echo '<form action=\'something.php\'>';`is functionally the same as `echo'
   <form action="something.php">';`
 * The same goes for any php function.
 * Hope that helps.
 *  [mohegan](https://wordpress.org/support/users/mohegan/)
 * (@mohegan)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/help-creating-first-plugin/#post-711764)
 * your the man!! I need help on mine.. [http://www.desiregoji.com](http://www.desiregoji.com)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Help creating first plugin’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [forms](https://wordpress.org/support/topic-tag/forms/)

 * 2 replies
 * 3 participants
 * Last reply from: [mohegan](https://wordpress.org/support/users/mohegan/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/help-creating-first-plugin/#post-711764)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
