Add more output.

Add styling.
parent 8812f2cd
Pipeline #83 failed with stage
in 0 seconds
......@@ -21,5 +21,22 @@
}
#grid > .calendar_day_cell {
width:100%;
width: 100%;
vertical-align: middle;
}
.calendar_day_cell h2 {
text-align: center;
}
.calendar_day_cell img {
width: 100%;
display: block;
margin-left: auto;
margin-right: auto;
vertical-align: middle;
}
.advent-joke-answer {
display: none;
}
<div class="calendar_day_cell">
<h2 <?php post_class() ?>>
<?php the_title(); ?>
<?php $image = get_field( 'acd_image' );
if ( isset( $image ) && $image['id'] ) {
</h2>
<?php
$image = get_field( 'acd_image' );
$video = get_field( 'acd_video' );
$alt = get_field( 'acd_alt_description' );
$alt_tag = ! empty( $alt ) ? sprintf( 'alt="%s"', esc_attr( $alt ) ) : '';
if ( isset( $image ) && $image['id'] ) {
?>
<img id="advent-image" src="<?php echo wp_get_attachment_url( $image['id'] ); ?>" <?php echo $alt_tag; ?>>
<?php
} elseif ( isset( $video ) ) {
echo $video;
}
$motto = get_field( 'acd_short_message' );
$joke_question = get_field( 'acd_joke_question' );
$joke_answer = get_field( 'acd_joke_answer' );
switch ( get_field( 'acd_motto_or_joke' ) ) {
case 'motto':
?>
<img id="advent-image" src="<?php echo wp_get_attachment_url( $image['id'] ); ?>">
<p class="advent-motto"><?php echo esc_html( $motto ); ?></p>
<?php
}
?>
</h2>
break;
case 'joke':
?>
<p class="advent-joke"><?php echo esc_html( $joke_question ); ?><span class="advent-joke-answer"><?php echo esc_html( $joke_answer ); ?></span>
</p>
<?php
break;
}
?>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment