Home › Forums › General Issues › Image Doesn't Show Up › Reply To: Image Doesn't Show Up
This is the php file for the page;
<?php
/*
Template Name: Abous Us - Parent
*/
?>
<p>test</p>
<?php get_header(); ?>
<div id="content" class="group">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$mypages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'post_date', 'sort_order' => 'desc' ) );
foreach( $mypages as $page ) {
$content = $page->post_content;
$content = apply_filters( 'the_content', $content );
?>
<div id="aboutSub"><div class="entryHeader"><?php echo $page->post_title; ?></div>
<div class="entry"><?php echo $content; ?><img src="<?php the_field('image1'); ?>" alt="" /></div></div>
<?php
}
?>
<?php endwhile; endif; ?>
</div><!-- END content -->
<?php get_footer(); ?>
Child pages use default page templates.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.