Title: Fatal error on wordpress theme
Last modified: August 21, 2016

---

# Fatal error on wordpress theme

 *  [jowelboss](https://wordpress.org/support/users/jowelboss/)
 * (@jowelboss)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-on-wordpress-theme/)
 * I am using a wordpress theme.It works good but in the portfolio section its shows
   fatal error.
    Here is the message
 * > Fatal error: Call to undefined function get_field() in /home/wakefiel/public_html/
   > wp-content/themes/wakefield/overview.php on line 50
 * The overview.php code is
 *     ```
       <?php
       /**
        * @package WordPress
        * @subpackage Default_Theme
        Template Name: Overview Template
        */
   
       get_header(); ?>
   
       <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
       	<?php
       				$page_id = null;
                      if($post->post_parent):
                        $page_id = get_top_ancestor($post->ID);
                      else:
                        $page_id = $post->ID;
                        endif;
       				$parent_title = get_the_title(get_page($page_id));
       		?>
   
       				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       					<?php if ( is_front_page() ) { ?>
                           	<?php
       						  	$homeTitle = get_post_custom_values("home-title");
       							if (isset($homeTitle[0])) {
       								echo '<h1>' . $homeTitle[0] . '</h1>';
       						?>
                               <?php } else { ?>
                                   <h1 class="entry-title"><?php the_title(); ?></h1>
                               <?php } ?>
       					<?php } else { ?>
       						<h1 class="entry-title"><?php the_title(); ?></h1>
       					<?php } ?>
   
       					<div class="entry-content">
       						<?php the_content(); ?>
   
       						<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
       						<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
       					</div><!-- .entry-content -->
   
       				</div><!-- #post-## -->
   
                        <?php if (get_field('overview')) { ?>
                        	<ul class='overview-list'>
                        <?php 	while(has_sub_field('overview')){ ?>
                         		 <li>
                                	<a href='<?php the_sub_field('link'); ?>'><h2><?php the_sub_field('title'); ?></h2>
                                	<img src='<?php the_sub_field('image'); ?>' />
                                   </a>
                                </li>
                        <?php } ?>
                        	</ul>
                         <?php } ?>
   
       				<?php //comments_template( '', true ); ?>
   
       <?php endwhile; ?>
   
       <?php get_footer(); ?>
       ```
   
 * Here is the website link [http://www.wakefieldinc.ca/portfolio/](http://www.wakefieldinc.ca/portfolio/)
 * I am waiting for your good suggestion.
    Thanks

The topic ‘Fatal error on wordpress theme’ is closed to new replies.

## Tags

 * [CODE problem](https://wordpress.org/support/topic-tag/code-problem/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 0 replies
 * 1 participant
 * Last reply from: [jowelboss](https://wordpress.org/support/users/jowelboss/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-on-wordpress-theme/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
