handling the anchro inside block template
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
558dbf6403
commit
8092e96ca1
|
|
@ -1,4 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
$anchor = isset($attributes['anchor']) && !empty($attributes['anchor']) ? esc_html($attributes['anchor']) : ($relatedPostId ? "post-content-container-" . $relatedPostId : '');
|
||||||
|
|
||||||
$relatedPageName = get_field('related_page') ?? null;
|
$relatedPageName = get_field('related_page') ?? null;
|
||||||
$subtitle = get_field('subtitle') ?? "";
|
$subtitle = get_field('subtitle') ?? "";
|
||||||
|
|
||||||
|
|
@ -56,7 +58,7 @@ $relatedPagePermalink = $relatedPageDatas['permalink'];
|
||||||
$thumbnail_url = $relatedPageDatas['thumbnail_url'] ?? null;
|
$thumbnail_url = $relatedPageDatas['thumbnail_url'] ?? null;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="page-redirector page-redirector--<?= $relatedPageName ?>" href="<?php echo "" ?>">
|
<div id="<?php echo $anchor ?>" class="page-redirector page-redirector--<?= $relatedPageName ?>" href="<?php echo "" ?>">
|
||||||
<div class="page-redirector__details-container">
|
<div class="page-redirector__details-container">
|
||||||
<h3><?php echo $relatedPageTitle ?></h3>
|
<h3><?php echo $relatedPageTitle ?></h3>
|
||||||
<p class="subtitle"><?php echo $subtitle ?></p>
|
<p class="subtitle"><?php echo $subtitle ?></p>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user