Home Forums Themes Support mediPress – Health and Doctor Medical WordPress Theme How to override shortcode template files in child theme

Topic Resolution: Resolved


Viewing 6 reply threads
  • Author
    • #15283

      How can I override files located in the parent theme’s “framework/shortcodes” folder? I’m trying to update the “doctor” shortcode with some custom fields and when I place the tpl1.php file in the same location in my childe theme, the parent theme file is not overwritten.

      I’ve placed the updated version of “tpl1.php” file in this file path “/wp-content/themes/medipress-child/framework/shortcodes/doctor/tpl1.php”, however it is not updated on the site. (No cache involved)


    • #15315

      Thanks for reaching us!
      Could you please send us Admin login detail?
      We will check and assist you to resolve this.

    • #15322
      This reply has been marked as private.
    • #15331

      Shortcode doctor/tpl1.php using normal.
      Link test: https://kaczmarski.staging.wpengine.com/demo_sc/
      Images: http://prntscr.com/jfx14l
      Please check again.

    • #15355

      Hi Long,
      It’s “normal” because I edited the tpl1.php file in the parent theme, which is NOT the correct way to do it. I want to OVERRIDE the tpl1.php file in the parent theme, by placing a modified version in the child theme. However when I do so, the file is not overridden and it still uses the parent theme file. Please check the site again to see what I mean. I’ve switched the parent theme file back to the default version and placed the override tpl1.php file in the childe theme under “/wp-content/themes/medipress-child/framework/shortcodes/doctor/tpl1.php”. This should override the parent theme file but it does not. Is there a way to make this override work? Thanks!


    • #15370

      I have fixed for you.
      Please check again!

    • #15403

      Great! Thank you! So to be clear for other users who might encounter this: the shortcode override actually was working but I had some CSS in the wrong place which was causing the overridden file to act funny.

Viewing 6 reply threads

You must be logged in to reply to this topic.