Title: Change shortcode
Last modified: October 22, 2020

---

# Change shortcode

 *  Resolved [vishae](https://wordpress.org/support/users/vishae/)
 * (@vishae)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/)
 * Just wondering whether there’s been an update to the original request: [https://wordpress.org/support/topic/use-a-different-shortcode/](https://wordpress.org/support/topic/use-a-different-shortcode/)
 * I tried adding the below code to my functionality.php but it didn’t do anything:
 *     ```
       Footnotes;
       add_shortcode( 'fn', array( $easyFootnotes, 'easy_footnote_shortcode' ) );
       ```
   
 * I even tried changing the following code in the plugin:
    `add_shortcode( 'efn_note',
   array( $this, 'easy_footnote_shortcode' ) );`
 * but that didn’t do anything either.
 * Help?

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

 *  Plugin Author [Jason Yingling](https://wordpress.org/support/users/yingling017/)
 * (@yingling017)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/#post-13568632)
 * The first example you have looks like it’s missing `global $easyFootnotes.` from
   the top line and only has `Footnotes;`.
 *     ```
       global $easyFootnotes;
       add_shortcode( 'fn', array( $easyFootnotes, 'easy_footnote_shortcode' ) );
       ```
   
 * Should be the full code. Was that just a copy paste error or is it not working
   with that full code?
 *  Thread Starter [vishae](https://wordpress.org/support/users/vishae/)
 * (@vishae)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/#post-13570198)
 * It wasn’t working with the full code; I pasted the wrong thing in my original
   post, but I did paste the full code in the functionality.php
 *  Thread Starter [vishae](https://wordpress.org/support/users/vishae/)
 * (@vishae)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/#post-13584322)
 * technically, if I was to change the code in plugin from:
 * `add_shortcode( ‘efn_note’, array( $this, ‘easy_footnote_shortcode’ ) );’
 * to:
 * `add_shortcode( 'ref', array( $this, 'easy_footnote_shortcode' ) );`
 * it should take [ref][/ref] as the new shortcode? Or is it more complicated than
   that?
 *  Plugin Author [Jason Yingling](https://wordpress.org/support/users/yingling017/)
 * (@yingling017)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/#post-13586558)
 * I dropped the code below in the functions.php on a test theme and things worked
   as expected using the `[fn][/fn]` shortcode. Is there another plugin oyu have
   that uses that?
 *     ```
       global $easyFootnotes;
       add_shortcode( 'fn', array( $easyFootnotes, 'easy_footnote_shortcode' ) );
       ```
   
 * Updating the code directly in the plugin should work as well but you’ll run into
   an issue if you update the plugin as it will get overwritten and you’ll have 
   to make the change again.
 *  Thread Starter [vishae](https://wordpress.org/support/users/vishae/)
 * (@vishae)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/#post-13589274)
 * okay, now I feel stupid. This is entirely user error – I was editing the functionality.
   php on one site while checking the result on another, which was why my changes
   weren’t going through.
 * Yes, your code works perfectly fine, it was me, not you.
 * Thank you for taking the time to answer my question.

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

The topic ‘Change shortcode’ is closed to new replies.

 * ![](https://ps.w.org/easy-footnotes/assets/icon-256x256.png?rev=2355746)
 * [Easy Footnotes](https://wordpress.org/plugins/easy-footnotes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-footnotes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-footnotes/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-footnotes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-footnotes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-footnotes/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [vishae](https://wordpress.org/support/users/vishae/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/change-shortcode-7/#post-13589274)
 * Status: resolved