WordPress.org

Ready to get started?Download WordPress

Forums

Adding Shortcodes to Child Theme (3 posts)

  1. Jason
    Member
    Posted 1 year ago #

    Greetings!

    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
    ɹoʇɐɹǝpoɯ
    Posted 1 year 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
    Member
    Posted 1 year 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.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic