I created custom post type name “agencies”, and a file called “single-agencies.php”.
For some reason, the_content()
doesn’t work, while the_title()
does work.
Here’s the code:
<?php get_header( 'agency' ); ?>
<div class="popup-container">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
the_title("<div class='entry-title'><h2>", "</h2></div>");
the_content();
var_dump(get_the_content()); // this outputs "String(0)"
?>
<div id="carousel" class="flexslider">
<ul class="slides">
<?php
if( have_rows('agencies_repeater') ):
while( have_rows('agencies_repeater') ): the_row();
$img_url = get_sub_field('agencies_add_img');
echo "<li><img src= '" . $img_url['url'] . "'/></li>";
endwhile;
else :
echo "no rows found";
endif;
?>
</ul>
</div><!--.flexslider-->
<div id="slider" class="flexslider">
<ul class="slides">
<?php
if( have_rows('agencies_repeater') ):
while( have_rows('agencies_repeater') ): the_row();
$img_url = get_sub_field('agencies_add_img');
echo "<li><img src= '" . $img_url['url'] . "'/></li>";
endwhile;
else :
echo "no rows found";
endif;
?>
</ul>
</div><!--.flexslider-->
</article>
</div><!--.popup-container-->
What’s going on here?
1 comment
Comments are closed.