Title: 1st plugin and shortcode attempt: FAIL
Last modified: August 20, 2016

---

# 1st plugin and shortcode attempt: FAIL

 *  [christian.j.king](https://wordpress.org/support/users/christianjking/)
 * (@christianjking)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/1st-plugin-and-shortcode-attempt-fail/)
 * Hi,
 * I tried my hand at making a small plugin that basically has one shortcode command
   in it. I do a lot of copying and pasting on my site and wanted to simplify the
   process; but, I’m getting header errors and when I activate the plugin, it messes
   up my events_planner plugin, saying that headers have already been sent. I have
   looked for some more info; but, nothing has helped thusfar.
 * Here’s my code:
 *     ```
       <?php
       /* Plugin Name: Unsigned
       Version: 0.1
       Description: Testing out plugin development
       Author: Christian King
       Author URI: http://www.theunsignedsounds.com
       Plugin URI: http://theunsignedsounds.com */?>
   
       <?php
       //[unreview] TEMPLATE SHORTCODE
       function unreview_func( $atts ){
   
       	extract( shortcode_atts( array(
       		'artist'=> 'artistname',
   
       		), $atts ) );
   
       	$audiolink = "http://theunsignedsounds.com/audio/".$artist.".mp3";
       	$audio = "[audio src='".$audiolink."']";
   
       	echo $audio;
       }
       add_shortcode( 'unreview', 'unreview_func' );
       ?>
       ```
   
 * <3

The topic ‘1st plugin and shortcode attempt: FAIL’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [christian.j.king](https://wordpress.org/support/users/christianjking/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/1st-plugin-and-shortcode-attempt-fail/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
