Quantcast
Viewing all articles
Browse latest Browse all 11471

Chouby on "[Plugin: Polylang] Possible bug: Main theme overrides child theme's wpml-config.xml"

Hi!

I am not sure to understand what you intend to do.

If you just switched the 2 code blocks, the parent theme file is not read. The correct code would be:

// theme
if (file_exists($file = ($template = get_template_directory()) .'/wpml-config.xml'))
 	$this->xml_parse(file_get_contents($file), get_template());

// child theme
if ( $template != ($stylesheet = get_stylesheet_directory()) && file_exists($file = $stylesheet.'/wpml-config.xml'))
	$this->xml_parse(file_get_contents($file), get_stylesheet());

Is it what you did?

You can also have a custom wpml-config.xml in wp-content/polylang (you have to create the directory) and this one is the latest loaded.


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>