Created
January 31, 2020 18:55
-
-
Save sinebeef/f6f09a00d231978dd1c6ba720f0baf83 to your computer and use it in GitHub Desktop.
WP Pdf Docs Include
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
<?php | |
$value = get_field( 'extra-docs' ); | |
if ($value) { | |
$exfiles = explode( ',', $value ); | |
//var_dump($exfiles) | |
?> | |
<div class="extra-docs"> | |
<p>Additional documents:</p> | |
<p>To view the cut out template files and technial specifiations view or download the pdf template files that come with this product</p> | |
<?php foreach ( $exfiles as $solofile ){ ?> | |
<span> | |
<a class="" href="https://alphashowers.co.uk/wp-content/uploads/documents/<?php echo $solofile; ?>" ref="nofollow" target="_blank">PDF Template</a> | |
</span> | |
<?php } ?> | |
</div> | |
<style> | |
.extra-docs p:nth-child(1) { | |
font-weight: 500; | |
font-size: 120%; | |
} | |
.extra-docs { | |
margin: 2em 0; | |
display: block; | |
width: 100%; | |
float: left; | |
} | |
.extra-docs span a { | |
display: block; | |
vertical-align: bottom; | |
float: left; | |
white-space: nowrap; | |
color: #fff700; | |
background: #5d5d5d; | |
height: 52px; | |
line-height: 52px; | |
font-weight: 600; | |
font-size: 18px; | |
min-width: 200px; | |
border-radius: 3px; | |
margin-top: 1px; | |
text-align:center; | |
margin-right: 15px; | |
margin-bottom: 15px; | |
} | |
.extra-docs span { | |
} | |
</style> | |
<?php }; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment