Created
August 26, 2022 15:11
-
-
Save mrwweb/0e9730ec84eb616fe0e05746d7b5cfce to your computer and use it in GitHub Desktop.
Using get_template_part() for Componentized WordPress Themes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Any WordPress Template | |
*/ | |
<!-- header stuff --> | |
<?php | |
get_template_part('parts/button', '', array( | |
'label' => 'Click me!', | |
'href' => 'https://example.com', | |
'extra_classes' => 'custom-class', | |
) ); | |
?> | |
<!-- footer stuff --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment