Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from CodetheChangeFoundation/CH-37
Ch 37
- Loading branch information
Showing
6 changed files
with
219 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
<?php | ||
if( function_exists('acf_add_local_field_group') ): | ||
|
||
acf_add_local_field_group(array( | ||
'key' => 'group_5be625bb048f9', | ||
'title' => 'Home Page Banner', | ||
'fields' => array( | ||
array( | ||
'key' => 'field_5be627a8e6478', | ||
'label' => 'enable home page title', | ||
'name' => 'enable_home_page_title', | ||
'type' => 'true_false', | ||
'instructions' => '', | ||
'required' => 1, | ||
'conditional_logic' => 0, | ||
'wrapper' => array( | ||
'width' => '', | ||
'class' => '', | ||
'id' => '', | ||
), | ||
'message' => '', | ||
'default_value' => 0, | ||
'ui' => 0, | ||
'ui_on_text' => '', | ||
'ui_off_text' => '', | ||
), | ||
array( | ||
'key' => 'field_5be627ece6479', | ||
'label' => 'home page title', | ||
'name' => 'home_page_title', | ||
'type' => 'text', | ||
'instructions' => '', | ||
'required' => 0, | ||
'conditional_logic' => array( | ||
array( | ||
array( | ||
'field' => 'field_5be627a8e6478', | ||
'operator' => '==', | ||
'value' => '1', | ||
), | ||
), | ||
), | ||
'wrapper' => array( | ||
'width' => '', | ||
'class' => '', | ||
'id' => '', | ||
), | ||
'default_value' => 'Building a hopeful community around action on climate change', | ||
'placeholder' => '', | ||
'prepend' => '', | ||
'append' => '', | ||
'maxlength' => '', | ||
), | ||
array( | ||
'key' => 'field_5be62823e647a', | ||
'label' => 'enable home page text', | ||
'name' => 'enable_home_page_text', | ||
'type' => 'true_false', | ||
'instructions' => '', | ||
'required' => 0, | ||
'conditional_logic' => 0, | ||
'wrapper' => array( | ||
'width' => '', | ||
'class' => '', | ||
'id' => '', | ||
), | ||
'message' => '', | ||
'default_value' => 0, | ||
'ui' => 0, | ||
'ui_on_text' => '', | ||
'ui_off_text' => '', | ||
), | ||
array( | ||
'key' => 'field_5be628463b150', | ||
'label' => 'home page text', | ||
'name' => 'home_page_text', | ||
'type' => 'wysiwyg', | ||
'instructions' => '', | ||
'required' => 0, | ||
'conditional_logic' => array( | ||
array( | ||
array( | ||
'field' => 'field_5be62823e647a', | ||
'operator' => '==', | ||
'value' => '1', | ||
), | ||
), | ||
), | ||
'wrapper' => array( | ||
'width' => '', | ||
'class' => '', | ||
'id' => '', | ||
), | ||
'default_value' => '', | ||
'tabs' => 'all', | ||
'toolbar' => 'full', | ||
'media_upload' => 1, | ||
'delay' => 0, | ||
), | ||
array( | ||
'key' => 'field_5be628593b151', | ||
'label' => 'enable home page image', | ||
'name' => 'enable_home_page_image', | ||
'type' => 'true_false', | ||
'instructions' => '', | ||
'required' => 1, | ||
'conditional_logic' => 0, | ||
'wrapper' => array( | ||
'width' => '', | ||
'class' => '', | ||
'id' => '', | ||
), | ||
'message' => '', | ||
'default_value' => 0, | ||
'ui' => 0, | ||
'ui_on_text' => '', | ||
'ui_off_text' => '', | ||
), | ||
array( | ||
'key' => 'field_5be628ab3b152', | ||
'label' => 'home page image', | ||
'name' => 'home_page_image', | ||
'type' => 'image', | ||
'instructions' => '', | ||
'required' => 0, | ||
'conditional_logic' => array( | ||
array( | ||
array( | ||
'field' => 'field_5be628593b151', | ||
'operator' => '==', | ||
'value' => '1', | ||
), | ||
), | ||
), | ||
'wrapper' => array( | ||
'width' => '', | ||
'class' => '', | ||
'id' => '', | ||
), | ||
'return_format' => 'url', | ||
'preview_size' => 'large', | ||
'library' => 'all', | ||
'min_width' => '', | ||
'min_height' => '', | ||
'min_size' => '', | ||
'max_width' => '', | ||
'max_height' => '', | ||
'max_size' => '', | ||
'mime_types' => '', | ||
), | ||
), | ||
'location' => array( | ||
array( | ||
array( | ||
'param' => 'page', | ||
'operator' => '==', | ||
'value' => '127', | ||
), | ||
), | ||
), | ||
'menu_order' => 0, | ||
'position' => 'normal', | ||
'style' => 'default', | ||
'label_placement' => 'top', | ||
'instruction_placement' => 'label', | ||
'hide_on_screen' => '', | ||
'active' => 1, | ||
'description' => '', | ||
)); | ||
endif; ?> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php if( get_field("enable_home_page_title") ): ?> | ||
|
||
<div class="row ml-4 mr-4 pb-4 home-page-banner" style="background-image: url('<?php the_field('home_page_image'); ?>')" > | ||
|
||
<div class="col md-6"> | ||
<div class ="home-page-banner-bottom-left pl-4"> | ||
<h4 class="font-weight-bold text-white overlay w-50 bg-dark pl-3 pr-3 pb-3 pt-3"> <?php the_field("home_page_title"); ?> </h4> | ||
<?php if( get_field("enable_home_page_text") && get_field("home_page_text") ): ?> | ||
<p class="pl-3 pr-3 pb-3 pt-3 w-50 bg-light"> <?php echo get_field("home_page_text", false, false); ?> </p> | ||
<?php endif; ?> | ||
|
||
<?php if( get_field("home_page_button_enable") && get_field("home_page_button_text") && get_field("home_page_button_link") ): ?> | ||
<a role="button" href="<?php echo the_field("home_page_button_link"); ?>" class="btn btn-outline-primary font-italic align-middle"> <?php the_field("home_page_button_text")?> </a> | ||
<?php endif; ?> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<?php endif; ?> |