mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 17:23:55 +01:00
new callToAction subtemplate function
This commit is contained in:
parent
a88986163d
commit
79e107fe2e
@ -296,14 +296,16 @@ class Subtemplate {
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
public function callToAction($subtemplateTitle) {
|
public function callToAction($subtemplateTitle) {
|
||||||
$buttonText = get_sub_field('create_free_account_text');
|
$ctaTitle = $subtemplateTitle;
|
||||||
$signUpLink = get_field('sign_up_link','option');
|
$ctaText = get_sub_field('cta_button_text');
|
||||||
|
$ctaLink = get_sub_field('cta_button_link');
|
||||||
$backgroundImg = get_sub_field('image')['url'];
|
$backgroundImg = get_sub_field('image')['url'];
|
||||||
|
|
||||||
|
|
||||||
$result = "<section class='subtemplate sign-up' style='background-image: url({$backgroundImg})'>
|
$result = "<section class='subtemplate sign-up' style='background-image: url({$backgroundImg})'>
|
||||||
<div class='centered-content'>
|
<div class='centered-content'>
|
||||||
<a href='{$signUpLink}' class='button blue-overPic'>{$buttonText}</a>
|
<h1>{$ctaTitle}</h1>
|
||||||
|
<div><a href='{$ctaLink}' class='button blue-overPic'>{$ctaText}</a></div>
|
||||||
</div>
|
</div>
|
||||||
</section>";
|
</section>";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user