How to add translation for FSE theme?

Could you please cross check lexiadesign is the correct Text Domain of your FSE theme. Agter this you can use given functions for Internationalization of Strings of your theme or plugin. esc_html__() : This is used to translate and escape HTML attributes. For Ex. <?php echo esc_html__(‘Download Lexia’, ‘your-theme-textdomain’); ?> esc_html_e() : This is used … Read more

Date not working correctly

What you did wrong here is the part date(‘d’, $rem_days). The function date() should be used to convert timestamp to a formatted date, not to converting a time difference in timestamp to time difference in days. You can fix this by replacing date(‘d’, $rem_days) with floor($rem_days/86400). The complete code should be: $event_date = strtotime( get_field( … Read more

useBlockProps() nests wrapper with class name inside block wrapper in the editor

I was bitten by this as well, and it caused me much frustration. I had exactly the same nested block duplication problem that you described above. I was able to solve this issue by specifying an apiVersion for my custom block. E.g.: registerBlockType(“custom-cafe-theme/custom-column”,{ apiVersion: 2, // or 3 title: “Custom Column”, attributes: { imgID: { … Read more