• Resolved derrida

    (@derrida)


    hi i am using twenty twenty four theme locally ( i also have my own custom theme, and the same issue is there, but in my custom theme i have code that enable editing products in the wordpress editor), in any case, when i edit a product and want to use the group block with alighfull or alignwide, the options disappear on save or update.

    everything works great on posts and pages (regular, not woocommerce).

    this is on a regular page.

    i am using useRootPaddingAwareAlignments”: true, in my theme.json

    what can i do to fix the issue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @derrida,

    To learn more about this issue, could you please share the code you’re using to enable editing products in the WordPress editor? (You mean the Blocks Editor, or Gutenberg, correct?). As well as to how you’re using this code (is it through Code Snippets or a similar plugin, through your custom theme’s functions.php? Is it through a plugin dedicated for this?).

    Since you mentioned this happens either on your custom theme or the default TT4 theme, I’d like to review the code you’re using to allow editing your products with the Blocks Editor. This could help us replicate the issue for further troubleshooting,

    i am using useRootPaddingAwareAlignments”: true, in my theme.json

    Have you defined your default sizes for the layouts in your theme.json? Like this, for instance:

    {
      “settings”: {
        “layout”: {
          “contentSize”: “820px”,
          “wideSize”: “1200px”
        }
      }
    }

    Additionally, if you could share a link to a product page you’ve edited using the Blocks Editor where this issue is present so we can learn more, that’d be really helpful.

    Thank you!

    All the best,
    Omar

    Thread Starter derrida

    (@derrida)

    hi, sorry for the delayed response. i have this function that allows to edit products with gutenberg.

    this is the code for allowing products to be edited in the wordpress editor:

    function activate_gutenberg_product( $can_edit, $post_type ) {
     if ( $post_type == 'product' ) {
            $can_edit = true;
        }
        return $can_edit;
    }
    add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 10, 2 );

    also i do have the layout content size and wide size in the theme.json file. and it works for posts and pages.

    i am testing locally so i have no link to give you.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello derrida

    Thank you for your reply and sharing the code snippet.

    I understand you have enabled Gutenberg Editor on Products using custom code. That is a creative work there. ??

    Coming back to your issue:
    When i edit a product and want to use the group block with alighfull or alignwide, the options disappear on save or update.

    Since this is a problem that occurs after custom code, I will not be able to assist you with that according to our Support Policy.

    However, I will encourage you to provide more details and maybe attach a video of what is happening. This will allow community members to understand your issue and help you with that.

    I hope this helps. ??

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘alignfull and align wide does not work in the single post content’ is closed to new replies.