MilenMK
Forum Replies Created
-
Hello.
I’ve tried the proposed solutions, but it has no effect.
We have an ACF field, and one that we have a problem with is named Length and has a sluglength
. The output array for this field is like this:array(16){
[3]=> object(stdClass)#41944 (6) {
["term_id"]=> int(3)
["slug"]=> string(7) "1000-mm"
["name"]=> string(7) "1000 mm"
["count"]=> int(192) ["cross_count"]=>int(47)
["wp_queried"]=> bool(false)
}
[455]=> object(stdClass)#41945 (6) {
["term_id"]=> int(455)
["slug"]=> string(7) "1100-mm"
["name"]=> string(7) "1100 mm"
["count"]=> int(52)
["cross_count"]=> int(13)
["wp_queried"]=> bool(false)
}
[8]=> object(stdClass)#41982 (6) {
["term_id"]=> int(8)
["slug"]=> string(7) "2000-mm"
["name"]=> string(7) "2000 mm"
["count"]=> int(180)
["cross_count"]=> int(43)
["wp_queried"]=> bool(false)
}
[264]=> object(stdClass)#41874 (6) {
["term_id"]=> int(264)
["slug"]=> string(7) "3000-mm"
["name"]=> string(7) "3000 mm"
["count"]=> int(112)
["cross_count"]=> int(23)
["wp_queried"]=> bool(false)
}
[9]=> object(stdClass)#41873 (6) {
["term_id"]=> int(9)
["slug"]=> string(6) "400-mm"
["name"]=> string(6) "400 mm"
["count"]=> int(152)
["cross_count"]=> int(37)
["wp_queried"]=> bool(false)
}
}And we’ve tried the proposed solution like this:
function wpc_sort_terms_as_needed( $terms, $filter ) { // pa_color - is desired taxonomy if ( $filter['e_name'] == 'length' ) { $newTerms = []; foreach ( $terms as $k => $term ) { $termOrder = get_term_meta( $term->term_id, 'slug', true ); $term->menu_order = ( $termOrder !== false ) ? $termOrder : 0; $newTerms[ $k ] = $term; } // To sort in descending order // usort( $newTerms, \FilterEverything\Filter\EntityManager::compareDesc('menu_order') ); // To sort in ascending order usort( $newTerms, EntityManager::compareAsc( 'menu_order' ) ); return $newTerms; } return $terms; }
However, no matter what we try for
$termOrder
key (slug or name) the result visible on the frontend is:1000 mm 1200 mm 1400 mm 1600 mm 1800 mm 2000 mm 400 mm 500 mm 600 mm 700 mm 800 mm 900 mm 2300 mm 2600 mm 3000 mm 1100 mm
Forum: Reviews
In reply to: [Hierarchy Product Category Drop Down] Only one dropdownHello.
As this is a “hierarchy” plugin, you can’t have hierarchy with only 1 level of categories. Thus, showing only one drop down is not possible. 2 is the minimum.
Forum: Plugins
In reply to: [Bulgarisation for WooCommerce] Показване чекбокс за данни за фактураРазбрах. При нас изискването е да се вижда формата за данни за фирма, но без генериране на фактура. Добавих чекбокса чрез functions.php на темата.
Forum: Reviews
In reply to: [Hierarchy Product Category Drop Down] Not workingI’ve done some digging, and apparently, the problem is that your theme (and maybe some other) does not utilize correctly the “shop” page i.e. “/shop/” strong is missing from the URL.
I’ve made some changes to the plugin to meet this issue and tested it with your theme and now it works. Please go to Admin Dashboard >> Plugins and update to v1.2.
- This reply was modified 2 years, 8 months ago by MilenMK.
Forum: Reviews
In reply to: [Hierarchy Product Category Drop Down] Not workingIt doesn’t matter if the product is not added to the Main category or first sub-category.
In your example, with 3 levels, the workflow is like this:
If you choose an option from the first dropdown and click the button, you will see only products from the main category (level 1).
If you choose an option from the first dropdown and also an option from the second dropdown and then click the button, you will see only products from this sub-category (level 2).
If you choose an option from the first dropdown, then an option from the second dropdown and then an option from the third dropdown and then click the button, you will see only products from the second sub-category (level 3).
If you can make a test page and give a link I will take a look.
@nguyenrom , it will be good also to change some texts in the same .js file. For example, the string “Today” is hardcoded in Vietnamese as “H?m nay” and cannot be easily translated, and the option for “Tomorrow” is missing (again in the same file). ??
- This reply was modified 2 years, 8 months ago by MilenMK.
Forum: Plugins
In reply to: [SimpleTOC - Table of Contents Block] Not working for paginated postI can give you skype or facebook if you want to make live test on my site. I have direct access to the server so …
Forum: Plugins
In reply to: [SimpleTOC - Table of Contents Block] Not working for paginated postThey are on: https://blacktiehost.com/wp-content/uploads/2021/04/Screenshot_1.png
Could it be because of the theme I am using? Or because my site is multisite?
- This reply was modified 3 years, 11 months ago by MilenMK.
Forum: Plugins
In reply to: [SimpleTOC - Table of Contents Block] Not working for paginated postHow to check on the frontend that “absolute URL” is on?
Forum: Plugins
In reply to: [SimpleTOC - Table of Contents Block] Not working for paginated postThe option for “absolute urls” is still on (didn’t turn it off).
Opcache is off, Memcached is on, also have rules in my htaccess file.
Tried PHP reload, apache reload, cleared Autoptimize cache, reload the page with Ctrl+F5 .. nada.Forum: Plugins
In reply to: [SimpleTOC - Table of Contents Block] Not working for paginated postYes, I’ve tried this solution as mentioned in another post – no luck.
Currently, this is the only option set to active – all other 3 are off.
- This reply was modified 3 years, 11 months ago by MilenMK.
I’m also interested in social share. Or at least allow code insert for external social share plugin in coupon description.
Yeah, resolved. But please consider this in your next release.
I have enabled 6G Firewall Protection and ADVANCED_CHAR_STRING_FILTER
I don’t have any custom rules added within your plugin. But I have other rules in .htaccess – general rewrite rules and W3 Total Cache rules which are after your plugin rules.
After the changes described in my previous post everything is OK.
ADVANCED_CHAR_STRING_FILTER, 5G/6G:[QUERY STRINGS] and 5G/6G:[REQUEST STRINGS].
If I remove the coresponding lines/character only from the .htaccess, after some time it’s updated and they are back. So, for now, I’ve edited “all-in-one-wp-security-and-firewall/classes/wp-security-utility-htaccess.php” and:
Line 804: Removed RedirectMatch 403 \` line 905: Changed to RewriteCond %{QUERY_STRING} (\\\|\.\./|=\'$|=%27$) [NC,OR] Line 1008: Changed to RewriteCond %{QUERY_STRING} (\\|\.\.\.|\.\./|~|<|>|\|) [NC,OR] Line 1036: RedirectMatch 403 (?i)(~|<|>|:|;|,|%|\\|\s|\{|\}|\[|\]|\|)
P.S.: To post the sign here I use the numeric value for the character “&-#-0-9-6-;” (without the dashes ofcourse ?? ). Not sure if this will work in .htaccess.