How to backup ACF option fields with SQL
To get the values SELECT * FROM wp_options WHERE option_name LIKE ‘options_%'” Export as SQL Remove the ID column from the INSERT […]
To get the values SELECT * FROM wp_options WHERE option_name LIKE ‘options_%'” Export as SQL Remove the ID column from the INSERT […]
I suppose you have enabled the Woocommerce > Products > Enable reviews option, right? Then check if the comment_status is open for […]
Query for mo_files_domains DROP TABLE IF EXISTS `ariz_icl_mo_files_domains`; CREATE TABLE `ariz_icl_mo_files_domains` ( `id` int(11) NOT NULL AUTO_INCREMENT, `file_path` varchar(250) COLLATE utf8mb4_unicode_520_ci NOT […]
If you need to replace product slugs in other language from the original you should try: add_action( ‘init’, function() { if ( […]
If you are using WPML please check that ACF Group is NOT translatable!
function bulk_add_sales_price( $discount_percentage = 20 ) { $products = get_posts( [ ‘post_status’ => ‘publish’, ‘post_type’ => ‘product’, ‘posts_per_page’ => – 1, ] […]
Let’s say you want to map the uploads folder with a folder in a network share drive. Open an Admin cmd and […]
In your functions.php place the following code if ( ! function_exists( ‘tiny_mce_before_init’ ) ) { function tiny_mce_before_init( $init ) { $init[‘fontsize_formats’] = […]
Dropping a file into the mu-plugins directory means that code runs automatically, without having to log into the admin. This comes in […]
SQL query for renaming Custom Post Types: UPDATE `wp_posts` SET `post_type` = ‘<new_post_type>’ WHERE `post_type` = ‘<old_post_type>’; SQL query for renaming Custom […]
This small class will help you in more advanced situations like getting the parent id of the current page, or find the children of […]
We have a CPT people, and each one people belongs to a department (which is a standard page). In each department’s internal […]
If you have a page with slug /slug and in that page you add a custom pagination or query string ?page=MyCustomPage and then reload the […]
If you forgot your admin password then add the following line in you theme’s functions.php wp_set_password(‘123’, 1); After that, navigate to the […]