• When you click “Add new pattern” in the editor, there is an option called “synced”. If you select this option and modify the pattern after creation, it will be modified simultaneously in all templates that use this pattern.

    Can’t this function be defined in a file rather than in the editor?

    <?php
    
    /**
    
    ?* Title: sample
    
    ?* Slug: some-slug
    
    ?* synced: true ( Is there no option name like this? )
    
    ?*/
    
    ?>
    
    <!-- wp:group {"layout":{"type":"constrained"}} -->
    
    <div class="wp-block-group">
    
    ? <!-- wp:paragraph -->
    
    ? <p>sample</p>
    
    ? <!-- /wp:paragraph -->
    
    </div>
    
    <!-- /wp:group -->
Viewing 4 replies - 1 through 4 (of 4 total)
  • Alor Web

    (@jerrymayalor555)

    Hi @devpandaking,

    There are two options for the pattern to be edited (a visual editor and a code editor). See image: https://share.zight.com/QwuXDOD8.
    Are you looking for a different option besides these two?

    Thanks

    Thread Starter devpandaking

    (@devpandaking)

    @jerrymayalor555

    I’m not familiar with English, so I don’t think the question was conveyed properly.

    The “synced” function, one of the options that appears when creating a “pattern” in the editor, looks good. Rather than creating a “pattern” in the editor, I want to create a “page.php” file in the development environment, create the pattern there, and add the “synced” option to this file.

    I ask this question because I am developing a template for the purpose of selling it.

    Looking at the official documentation, it doesn’t seem like there is such an option. Is this possibly impossible?

    Thanks for your reply.

    Alor Web

    (@jerrymayalor555)

    I have found some documentation that might help you.

    https://developer.www.ads-software.com/block-editor/reference-guides/block-api/block-patterns/

    Let me know if this helps.

    Thanks

    Thread Starter devpandaking

    (@devpandaking)

    @jerrymayalor555

    Thanks for your reply.
    But what you gave doesn’t define the option to “synchronize”. Perhaps this feature may only be supported in the dashboard editor. Anyway… I couldn’t solve it, but thank you for the answer.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I enable the “Sync” feature when creating a pattern?’ is closed to new replies.