Hope you all be safe in this time of crisis. I'm looking for a solution to program my theme.. I do sometimes have content in my wordpress however i also does via a json. I wrote something but its throwing basic WP errors.
I need something like this but code correctly:
<div class="col-md-12">
<h3 class="h3">About {{ctrl.Coin.name}}</h3>
<?php
if ( have_posts() && get_the_content() != '') {
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/coindetail-content', get_post_type() );
endwhile; // End of the loop.
} else {
echo '<p ng-bind-html="ctrl.Coin.descriptionhtml"></p>';
}
?>
</div>
Who can help me with this?
Regards Dutch
Wrong function. You have to call have_posts() instead of have_post().
like: