madfcat
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Attributes in a Dynamic Custom BlockThis should be added to the docs. So hard to find!
Forum: Fixing WordPress
In reply to: sub pages under parent page give 404 errorI got a crazy error where subpages dont render. If I remove the parent page from them, they start to show up.
Trying to get to the suboages give me Page 404. What can be a problem? I tried to reset permalinks and reset htaccess. It did not help. Any suggestions?
UPDATE: Ok. I found what it was. I had a page and custom post type created by ACF of the same name.My parent page name was company and I had a custom post type company. Changing it to another name solved the issue! Cheers!
- This reply was modified 10 months, 2 weeks ago by madfcat.
Forum: Developing with WordPress
In reply to: Different Global color styles for different templates?Thank you for the answer. I think what you refer is not exactly what I need.
Theadd_theme_support('dark-editor-style')
function call in WordPress is used to enable support for a dark editor style in the WordPress admin (editor) interface. When this theme support is added, it provides a darker color scheme for the editor, making it more suitable for users who prefer a dark background while working on content.
I am trying to figure out a way to have a template styling consitent between the frontend and the block editor.
I can wrap my template parts into some group (div) and add a Additional CSS Class from advanced tab or to the comment and html markup from the template part.
I think I will just go this way.Forum: Developing with WordPress
In reply to: Different Global color styles for different templates?Yes, the subject is applicable. The articles mentioned there were not helpful. Or I just could not find the answer easily.
My approach: I tried to do it with css, as having a custom template we also have a class added tobody
tag.
For example, I have a custom template namedindex-dark.html
and.page-template-index-dark
is added to thebody
tag.
I tried to style it. And the changes don’t show on the editor. It would be so good to have this class in the editor as well.
I tried to wrap my template in thegroup
and assign a custom class to it. Then I styled it instyle.css
and I could achieve what I wanted even though it was not perfect. So what is the purpose of the.page-template-index-dark
if it is not in the editor ???♀?
Any other suggestions how I can do it?
EDIT:
I have added this class.page-template-index-dark
to every template part in the template and it became a bit better. But I still don’t understand why we don’t have this classes by default when we switch the template.- This reply was modified 10 months, 3 weeks ago by madfcat.
Forum: Fixing WordPress
In reply to: Several footers and several headers in one block theme?Ok. I have found a solution. My second footer is named parts/footer-with-button.html
I just had to register it in the theme.json file like this:"templateParts": [ { "area": "header", "name": "header", "title": "Header" }, { "area": "footer", "name": "footer", "title": "Footer" }, { "area": "footer", "name": "footer-with-button", "title": "Footer" } ]
Forum: Fixing WordPress
In reply to: Several footers and several headers in one block theme?I am creating a full site editing theme. The problem is that when I add another footer called footer-with-button.html to the parts directory in my theme, it is added to general category of template parts. Only file footer.html is added to Footer category.
How can I add my new footer created via html file? It works if I create it from the admin part of the wordpress. There I can choose which template part I am creating.Forum: Plugins
In reply to: [WP Mail Logging] WP Mail Logging Not DeletingSame here! Any suggestions?
This helped for me. It deleted all data.
Cleanup
Delete all data on deactivation? (emails and settings)?- This reply was modified 2 years ago by madfcat.
There is a mistake in /classes/woocs.php
Change line 3937 (version 2.3.7 and also free version 1.3.7):
$total = $total - WC()->cart->get_discount_total();
to this:
$back_convert_discount = (float) $this->back_convert(WC()->cart->get_discount_total(), $currencies[$this->current_currency]['rate']); $total = $total - $back_convert_discount;
Please, close the ticket as it’s WOOCS issue and not WOOCOMMERCE.
Have a nice day!
Forum: Plugins
In reply to: [Russian Post and EMS for WooCommerce] Не считает вес при смене языка WPMLПроблема: несмотря на то, что настройки показывают вес в граммах для товаров, вес на втором языке wpml (русский) воспринимается как килограммы (поэтому вы получаете 540000 г вместо 540 г) в этом плагине. Вы получаете перевес и способ доставки не отображается.
Как исправить?
В общем вот костыль для решения этой проблем
В файле inc/class-rpaefw-shipping-method.php
после кода:
$weight = ceil( wc_get_weight( $woocommerce->cart->cart_contents_weight, 'g' ) );
добавить этот код:
if (ICL_LANGUAGE_CODE != 'en') { $weight = $weight/1000; }
Но всё же хочется понять природу, почему так происходит.
Либо фикс в новой версии.Forum: Plugins
In reply to: [Russian Post and EMS for WooCommerce] Международная доставка?Можно закрывать. С этим разобрался.
Forum: Plugins
In reply to: [YML for Yandex Market] WPML?Очень жаль. Хороший плагин, но не хватает этого функционала.
How to disable Woocommerce auto-updates?
Please, close the topic. Everything works just fine.
There was a unnecessary<a href="#">
before the php with shortcode. All three work fine. My bad ??UPDATE #2: It seems thta I have found it in Codex section of your website:
<?php echo do_shortcode('[woocs show_flags=1 txt_type="desc" style=3]'); ?>
So, never mind and have a nice day!
Thank you for this lightning fast answer!