Easy to change Shortcode names
-
I was going to write my own Shortcode to do this .. and now I don’t have to, thanks to you!
For anyone interested, it’s very simple to alter the Shortcode names to something a bit less simplistic. All that’s needed is to edit a single file “jonradio-current-year-and-copyright-shortcodes.php” and change THREE lines as follows:
#1 BEFORE: add_shortcode( 'y', 'jr_cy_y' ); AFTER: add_shortcode( 'jrsc_curryear', 'jr_cy_y' ); #2 BEFORE: add_shortcode( 'c', 'jr_cy_c' ); AFTER: add_shortcode( 'jrsc_copyright', 'jr_cy_c' ); #3 BEFORE: add_shortcode( 'cy', 'jr_cy_cy' ); AFTER: add_shortcode( 'jrsc_both', 'jr_cy_cy' );
Once you’ve completed this change, you can use the new Shortcode names:
jrsc_curryear - current year jrsc_copyright - copyright symbol jrsc_both - copyright symbol + space + current year
Hope this helps!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Easy to change Shortcode names’ is closed to new replies.