How to override a function when isn’t at functions.php

The new function in your child theme’s functions.php cannot override a function from the parent’s functions.php file unless that function is written to be pluggable, i.e. declared with if (!function_exists(‘alterna_get_social_list’)) Per the documentation on Child Themes and how they inherit from child functions.php files: Using functions.php Unlike style.css, the functions.php of a child theme does … Read more

WordPress Theme Update Action?

I have never tried to do what you are trying to do, so no promises, but there is an action hook called upgrader_process_complete in the upgrade method of the Theme_Upgrader class, and it look like it would do what you want. The action is called like: do_action( ‘upgrader_process_complete’, $this, array( ‘action’ => ‘update’, ‘type’ => … Read more

Safe to disable wptexturize?

wptexturize() (in wp-includes/formatting.php) tries to convert typewriter quotes ” and ‘ into typographically correct pendants like “ or «, depending on current translation files. If you cannot type correct quotes, you should not disable it. There are some related replacements for dashes and ellipsis (not localized for whatever reason). All these replacement are done with … Read more

When tax_query used, results disappear (0 =1 produced)

tax_query takes an array of arrays. You have an array of arrays of arrays. var_dump($tax_queries); and will get this: array(1) { [0]=> array(1) { [0]=> array(3) { [“taxonomy”]=> string(15) “difficulty_mode” [“terms”]=> NULL [“field”]=> string(4) “slug” } } } Try it without the square brackets. That is turn this: $tax_queries[] = array( array ( ‘taxonomy’ => … Read more