We help IT Professionals succeed at work.

call to undefined get_footerbottom error

I have created a php file name footerbottom.php with the following code:

<div id="subwidg">
<img src="/wp-content/themes/Basic/images/subbottom.jpg" width="856" height="60" />
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("footer-bottom") ) : ?>
    <?php endif; ?>

Open in new window

and when i call this from home.php ( which is the template for home page)

<?php get_header(); ?>

<div id="container">
<div id="left-div">
    <div id="left-inside">
        <?php if (get_option('basic_format') == 'on') { ?>
			<?php get_template_part('includes/blogstyle'); ?>
        <?php } else { get_template_part('includes/default'); } ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php get_footerbottom(); ?>

Open in new window

its throwing an error saying

Fatal error: Call to undefined function get_footerbottom() at line 13 in home.php

which is get_footerbottom()

what and where am i making the mistake. any help is appreciated

Watch Question

Top Expert 2013

I don't see a function called get_footerbottom().  

Where is it defined?

Instead of this:

<?php get_footerbottom(); ?>

you may want to try this:

<?php include_once(/path/to/footerbottom.php); ?>

this will include the contents of the file you created which looks like it is just plain HTML for the most part.  Obviously, you will need to update the path info so your script can find the footerbottom.php file.


I tried include_once and its throwing an error

Warning: include_once(0php) [function.include-once]: failed to open stream: No such file or directory in /home/shadmin/www/mysite.com/wp-content/themes/Basic/home.php

but the file exists under the Basic directory

Ok i knew where i was making the mistake. instead of using get_footerbottom i declared it as below

<?php get_template_part('includes/footerbottom'); ?>

Open in new window

Jason C. LevineDon't talk to me.

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.