致命错误:Call to undefined function get_field() in /opt/lampp/htdocs/element/wp-content/themes/element/post_types/post-talent.php on line 13
<?php
$category = get_the_category();
$query = substr_replace($category[0]->name, " ", strlen($category[0]->name)-1); ?>
<div id="content" class="talent" role="main">
<h1><?php the_title(); ?></h1>
<div class="post-body">
<div class="entry">
<?php
if ( get_field('talent_work') ) :
static $count_em;
while ( has_sub_field( 'talent_work' ) ) : ++$count_em; ?>
<div class="talent-work talent-work-<?php echo $count_em; ?>">
<?php if ( $img = get_sub_field('preview_image') ) : ?>
<img src="<?php echo $img['sizes']['large']; ?>">
<?php endif; ?>
<h3><?php echo get_sub_field('video_client'); ?></h3>
<p><?php echo get_sub_field('video_title'); ?></p>
<div class="embed hidden">
<?php echo get_sub_field('embed_code'); ?>
</div>
</div><!-- / .talent-work -->
<?php endwhile;
endif; ?>
</div><!-- / .entry -->
</div><!-- / .post-body -->
<div class="modal" id="talent-modal">
<div class="modal-header">
<h3></h3>
<div class="close">
<a href="#" class="close-button">Close</a>
</div>
</div>
<div class="iframe-wrap"></div>
</div><!-- / .talent-modal -->
</div><!-- #content -->
答案 0 :(得分:1)
有几个原因: