• Resolved md_quer

    (@mdquer)


    I have a Custom Block Theme. And i use the Create Block Theme, it helped me a lot with the Fonts. But when i try to use Create Block Theme > Export, then the Plugin creates of every template-part an extra folder: patterns with.php files in it.
    My block theme does not have patterns and only templates and parts with .html files.
    The template part eg. footer.html looks afterwards like this:

    <!-- wp:pattern {"slug":"teste-theme-blank-theme/footer"} /-->

    And it creates a footer.php file with the code in it.
    When i use Create Block Theme Clone, then there are no .php files in it.

    I tought, for patterns i had to register those patterns in the functions.php file of the block theme. But by this export there ist nothing like this in my functions.php file

    So my question:
    ( i use wordpress 6.7 or higher. test envirement ist WAMP )
    Is this wanted ? Becaus a block theme should not include .php files, i thought. Or is this, because of wordpress version 6.7 ? This i have not tested.

    • This topic was modified 3 months, 2 weeks ago by md_quer.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter md_quer

    (@mdquer)

    And when i import this block theme in wordpress > themes , which i exportetd with Create Block Theme, and then export ( download ) it in website editor directly , then this .php files are gone again.

    Sébastien SERRE

    (@sebastienserre)

    Hello,

    If in a pattern you’re adding a shortcode with the block Shortcode. Is the php file created without any apply_shortcodes() or do_shortcodes() ?

    Thread Starter md_quer

    (@mdquer)

    Hello, your question has nothing to do with my question. My question is about the create block theme plugin.

    But to your question:

    When i make a new pattern in a block theme, and it is synced, then wordpress creates a new php file, in my example a cover block, with text etc. and a shortcode block. Then the php file ist created without apply_shortcodes()?or?do_shortcodes()?.

    this ist the code for the shortcode block in the php file:

    <!-- wp:shortcode -->
    <h2>Testüberschrift für den Shortcode Block</h2>
    <p>Dies ist ein einfacher Testtext, um zu prüfen, wie der Shortcode Block funktioniert. Du kannst hier auch mehr Text, Links oder andere HTML-Elemente einfügen.</p>
    <!-- /wp:shortcode -->
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.