WordPress.org

Forums

Fatal error on wordpress theme (1 post)

  1. jowelboss
    Member
    Posted 1 year ago #

    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/

    I am waiting for your good suggestion.
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic