custom-blocks.php 731 B

12345678910111213141516171819202122
  1. <?php
  2. function acf_faculty_member_block()
  3. {
  4. // check function exists
  5. if (function_exists('acf_register_block')) {
  6. // register a portfolio item block
  7. acf_register_block(array(
  8. 'name' => 'faculty_member',
  9. 'title' => __('Faculty Member'),
  10. 'description' => __('A custom block for faculty information.'),
  11. 'render_template' => 'template-parts/blocks/faculty-member/block-faculty-member.php',
  12. 'category' => 'layout',
  13. 'icon' => 'businessperson',
  14. 'keywords' => array('faculty'),
  15. ));
  16. }
  17. }
  18. add_action('acf/init', 'acf_faculty_member_block');