Title: Change shortcode?
Last modified: August 31, 2019

---

# Change shortcode?

 *  [Lunis](https://wordpress.org/support/users/lunis/)
 * (@lunis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/change-shortcode-6/)
 * I know this plugin is discontinued and fully understand if you can’t help here.
   But a small question … Is it possible to change the shortcode input from:
 * `[dropcap]...[/dropcap]`
 * to
 * `<p>[dropcap]...[/dropcap]</p>`
 * Been trying to change the plugin files but haven’t been able to change the input.
 * Thanks!

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

 *  Plugin Author [Yudhistira Mauris](https://wordpress.org/support/users/maurisrx/)
 * (@maurisrx)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/change-shortcode-6/#post-11889106)
 * Hi,
 * You can add the wrapping html code directly in the editor without changing the
   shortcode input. You can do so like this: `<p>[dropcap]This[/dropcap] is a text.
   </p>`
 *  Thread Starter [Lunis](https://wordpress.org/support/users/lunis/)
 * (@lunis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/change-shortcode-6/#post-11889512)
 * Thanks. I was looking for a way to make work like that automatically – when pressing
   the D-button in the Visual Editor, though.
 * Best!
 *  Plugin Author [Yudhistira Mauris](https://wordpress.org/support/users/maurisrx/)
 * (@maurisrx)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/change-shortcode-6/#post-11891089)
 * You need to change the code in the file `includes/js/shortcode-button.js:15` 
   and `includes/js/shortcode-button.js:18`.
 *  Thread Starter [Lunis](https://wordpress.org/support/users/lunis/)
 * (@lunis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/change-shortcode-6/#post-11894404)
 * Yeah. Tried to change the code from
 *     ```
       if( selected !== ' ' || selected !== null ) {
                           // if text is selected when button is clicked, wrap shortcode around it
                           content =  '[dropcap]' + selected + '[/dropcap]';
                       } else {
                       	// add shortcode without the selected text
                       	content = '[dropcap][/dropcap]';
                       }
       ```
   
 * to
 *     ```
       if( selected !== ' ' || selected !== null ) {
                           // if text is selected when button is clicked, wrap shortcode around it
                           content =  '<p>[dropcap]' + selected + '[/dropcap]</p>';
                       } else {
                       	// add shortcode without the selected text
                       	content = '<p>[dropcap][/dropcap]</p>';
                       }
       ```
   
 * But nothing’s changed. It still inserts [dropcap]…[dropcap] when pressing the
   shortcode button.
 * I have almost no coding experience, sorry.
    -  This reply was modified 6 years, 9 months ago by [Lunis](https://wordpress.org/support/users/lunis/).
    -  This reply was modified 6 years, 9 months ago by [Lunis](https://wordpress.org/support/users/lunis/).
 *  Plugin Author [Yudhistira Mauris](https://wordpress.org/support/users/maurisrx/)
 * (@maurisrx)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/change-shortcode-6/#post-11899041)
 * Try to clear your site and browser cache. It seems the modified JS script hasn’t
   been loaded. Your modified file looks good.

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/simple-drop-cap.svg)
 * [Simple Drop Cap](https://wordpress.org/plugins/simple-drop-cap/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-drop-cap/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-drop-cap/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-drop-cap/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-drop-cap/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-drop-cap/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Yudhistira Mauris](https://wordpress.org/support/users/maurisrx/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/change-shortcode-6/#post-11899041)
 * Status: not resolved