Support » Plugin: Strong Testimonials » Overwriting plugin files in child-theme not working

  • Resolved Toomas

    (@toomask)


    Hello

    I’m using ACF to add custom field (additional logo) to Strong Testimonials template. If I modify plugin files directly inside plugin folder, everything works fine. But I don’t want to modify plugin files inside plugin folder, instead I’m trying to make changes in child-theme, so I can keep modifications after plugin updates.

    In copied /plugins/strong-testimonials/templates/default/content.php to my child-theme /strong-testimonials/templates/default/content.php

    and added following code to child-theme’s functions.php file:

    require_once( get_stylesheet_directory() .’/strong-testimonials/templates/default/content.php’ );

    Unfortunatley I get following errors:

    Notice: Undefined variable: query in /wp-content/themes/child-theme/strong-testimonials/templates/default/content.php on line 15

    Fatal error: Call to a member function have_posts() on a non-object in /wp-content/themes/child-theme/strong-testimonials/templates/default/content.php on line 15

    Any ideas, how to make this work?

    Best regards!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Overwriting plugin files in child-theme not working’ is closed to new replies.