PHP – Merging two arrays into one array (also Remove Duplicates)
array_unique(array_merge($array1,$array2), SORT_REGULAR); http://se2.php.net/manual/en/function.array-unique.php
array_unique(array_merge($array1,$array2), SORT_REGULAR); http://se2.php.net/manual/en/function.array-unique.php
.htaccess is a hidden file, so you must set all files as visible in your ftp. I suggest you return your permalink structure to default ( ?p=ID ) so you ensure that .htaccess is the problem. After that, you could simply set “month and name” structure again, and see if it works. PS: Have you … Read more
WOOCOMMERCE ORDERS IN VERSION 3.0+ Since Woocommerce mega major Update 3.0+ things have changed quite a lot: For WC_Order Object, properties can’t be accessed directly anymore as before and will throw some errors. New WC_Order and WC_Abstract_Order getter and setter methods are now required on the WC_Order object instance. Also, there are some New classes … Read more
WordPress uses jQuery in noConflict mode by default. You need to reference it using jQuery as the variable name, not $, e.g. use jQuery(document); instead of $(document); You can easily wrap this up in a self executing function so that $ refers to jQuery again (and avoids polluting the global namespace as well), e.g. (function … Read more
I think this is the kind of question only a core developer could/should answer. I’ve researched and found the core ticket #17048: URLs delivered to the browser should be root-relative. Where we can find the reasons explained by Andrew Nacin, lead core developer. He also links to this [wp-hackers] thread. On both those links, these … Read more
apply_filters($tag, $value) passes the ‘value’ argument to each of the functions ‘hooked’ (using add_filter) into the specified filter ‘tag’. Each function performs some processing on the value and returns a modified value to be passed to the next function in the sequence. For example, by default (in WordPress 2.9) the the_content filter passes the value … Read more
I know what you mean about the tutorials. Here’s how I do it: First you need to write your script. In your theme folder create a folder called something like ‘js’. Create a file in that folder for your javascript. E.g. your-script.js. Add your jQuery script to that file (you don’t need <script> tags in … Read more
Nevermind! I found it 🙂 get_queried_object()->term_id;
You can do it in code by calling the following functions. error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); or error_reporting(E_ALL ^ E_DEPRECATED);
Try to add the code in wp-config.php: define(‘FS_METHOD’, ‘direct’);