Last active
April 26, 2020 15:41
-
-
Save krasenslavov/53812f7b9568a3972cffc823e9f9d8c8 to your computer and use it in GitHub Desktop.
CPT UI + Advanced Custom Fields + Front-end data collection form. Visit blog post https://bit.ly/2KwpDWK
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
<?php | |
// Single page to display each restaurant. | |
get_header(); | |
?> | |
<main id="site-content" role="main"> | |
<div class="page type-page status-publish hentry"> | |
<div class="post-inner thin"> | |
<div class="entry-content"> | |
<?php | |
if (have_posts()) { | |
while (have_posts()) { | |
the_post(); | |
$photo = get_field('photo', get_the_ID()); | |
?> | |
<h3><?php echo get_field('business_name', get_the_ID());?></h3> | |
<p><?php echo get_field('address', get_the_ID());?></p> | |
<img src="<?php echo $photo['sizes']['medium_large'];?>" alt="" /> | |
<h4>Working Hours</h4> | |
<p><?php echo get_field('working_hours', get_the_ID());?></p> | |
<h4>Short Description</h4> | |
<p><?php echo get_field('short_description', get_the_ID());?></p> | |
<?php | |
} | |
} | |
?> | |
</div> | |
</div> | |
</div> | |
</main> | |
<?php | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment