WordPress.org

Ready to get started?Download WordPress

Forums

Media Category Library
Child theme template directory (1 post)

  1. sinhro
    Member
    Posted 1 year ago #

    The plugin is only checking the parent theme directory for the templates, could you check if it exists in the child theme dir first?

    Something like this:

    function get_template_file( $file ) {
      $template = get_stylesheet_directory() . '/' . $this->get_plugin_dir() . '/' . $file;
      if ( ! file_exists( $template ) ) $template = get_template_directory() . '/' . $this->get_plugin_dir() . '/' . $file;
      if ( ! file_exists( $template ) ) $template = $this->get_plugin_path() . '/views/' . $file;
      return $template;
    }

    Thanks!

    http://wordpress.org/extend/plugins/media-category-library/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.