Fatal error: Call to undefined function – How to remove this call from template?
-
I have removed the next/previous post links from my Category pages
using the following in functions.php…remove_action( 'twentytwelve_content_nav', 'next_posts_link'); remove_action( 'twentytwelve_content_nav', 'previous_posts_link');
It works fine, and the page loads as it should but there is an error message at the bottom of the
page
Fatal error: Call to undefined function twentytwelve_content_nav() in ……./themes/2012-
Child/category.php on line 34
Fine, I thought I can fix that by commenting out the line in Category.php..
that’s this line…
twentytwelve_content_nav( ‘nav-below’ ); ?>
Could I hell!
I then get…
Parse error: syntax error, unexpected ‘<‘
this particular symbol is not shown in the Codex for some reason, and not being a coder I don’t know what it means.
so I tried removing everything else below it
Nope,
I even tried making the deleting the whole Category.php child file
Nope, that breaks the site.
So my question…
How do I remove the twentytwelve_content_nav( ‘nav-below’ ); ?> call from the child Category.php
file?
BTW
I don’t ask for help unless desperate, I have looked at over 300 web pages to solve this problem,
Nope!Theme is 2012 with child
Here is the complete template contents for category.php (child)
<?php /** * The template for displaying Category pages - 2012 CHILD THEME */ get_header(); ?> <section id="primary" class="site-content"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <header class="archive-header"> <h1 class="page-title"> <span><?php single_cat_title( '', false ); ?></span> </h1> <?php if ( category_description() ) : // Show an optional category description ?> <div class="archive-meta"><?php echo category_description(); ?></div> <?php endif; ?> </header><!-- .archive-header --> <?php /* Start the Loop */ while ( have_posts() ) : the_post(); /* Include the post format-specific template for the content. If you want to * this in a child theme then include a file called called content-___.php * (where ___ is the post format) and that will be used instead. */ get_template_part( 'content', get_post_format() ); endwhile; twentytwelve_content_nav( 'nav-below' ); ?> <?php else : ?> <?php get_template_part( 'content', 'none' ); ?> <?php endif; ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
- The topic ‘Fatal error: Call to undefined function – How to remove this call from template?’ is closed to new replies.