Adding Shortcodes to Child Theme (3 posts)

  1. Jason Adams
    Posted 3 years ago #


    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! :)

  2. cubecolour
    Posted 3 years ago #

    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

  3. Jason Adams
    Posted 3 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Topic