iamonstage
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Woocommerce product tab locked Version 7.7.0I too am experiencing this.
I have enabled the Gutenberg editor for WooCommerce products using the below code.
function wplook_activate_gutenberg_products($can_edit, $post_type) { if ($post_type == 'product') { $can_edit = true; } return $can_edit; } add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 10, 2);
I am now unable to remove these blocks.
This update has also broken my custom content-single-product.php
I also have the below code to add WooCommerce categories to the body class, which is now throwing an error.
add_filter('body_class', 'wc_cat_names'); function wc_cat_names($classes) { if (is_product()) { global $post; $terms = get_the_terms($post->ID, 'product_cat'); foreach ($terms as $term) { $classes[] = $term->slug; } } return $classes; }
Warning: Invalid argument supplied for foreach() in?/Users/EXAMPLE/Development/local/wp-content/themes/EXAMPLE/inc/woocommerce.php?on line?287
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Is HTML block content included in search?Thought so, Thanks for clarifying!!
Hope you have a good day! ??
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Is HTML block content included in search?Amazing, thanks.
Would the plugin also index any content that is on the page.php or template-part PHP files?Forum: Plugins
In reply to: [Import any XML, CSV or Excel File to WordPress] Import buttons not workingI can confirm I have the same issue and the above Migrate Helper plugin fixed the issue.
Note the above plugin reported the below warnings:
https://www.example.com/wp-content/plugins/wp-all-import-pro/static/js/admin.js: ‘hover’ pseudo-event is deprecated, use ‘mouseenter mouseleave’Forum: Plugins
In reply to: [A-Z Listing] Change the field from which is usedThanks for you reply @diddledan
I have the below code alternative. Is this OK and do you see any problems with it?add_filter('a_z_listing_pre_index_item_title', 'lf_replace_term_name_for_artist_surname', 10, 3); function lf_replace_term_name_for_artist_surname($title, $item, $type) { $artistsurname = ''; if ($type == 'terms') { $artistsurname = get_field('artist_surname', $item); } if ($artistsurname) { return $artistsurname; } else { return $title; } } add_filter('_a-z-listing-extract-item-indices', 'lf_revert_original_term_name', 10, 3); function lf_revert_original_term_name($item_indices, $item, $type) { if ($type == 'terms') { if ($item_indices) { foreach ($item_indices as $key => $item_indice) { $item_indices[$key][0]['title'] = $item->name; } } } return $item_indices; }
Forum: Plugins
In reply to: [A-Z Listing] custom field optionHi @verylongelbow
Did you manage to work this out?
I too need to index by surname.Forum: Fixing WordPress
In reply to: Moved server – Forbidden on all except FrontI changed the siteurl and home in the database already.