Support » Themes and Templates » Adding Shortcodes to Child Theme

  • Jason Adams



    I’m currently working on a child theme for a theme I bought, and everything works.. accept adding shortcodes. The parent theme has a /lib/shortcodes/shortcodes.php file, where would I add my own shortcodes.php file in the child to work as an extension of the parent’s? I tried adding a /child/lib/shortcodes/shortcodes.php, but it didn’t seem to work.

    I’m rather new to this, but trying to get my feet wet. Thanks for your help! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator cubecolour



    Typically I would make a plugin to add shortcodes.

    If you want a method specific to your parent theme you need to get support from the theme vendor if it is a commercial theme

    Jason Adams


    A plugin? Hmm…

    Initially I added the shortcode to the parent theme. I wanted to create a [staff] shortcode to make styling en masse easier. This works fine, but I obviously have an issue if the vendor updates the theme. I could simply add it again, but I thought a child theme could accomplish this.

    But this may be the time to look into writing WP plugins. I do have a background as a developer, just not web (aside form web applications) and WP.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Shortcodes to Child Theme’ is closed to new replies.