• Resolved ChuckH58

    (@chuckh58)


    I’m working with a subdomain website for a new customer and I get this at the bottom of the site: Fatal error: Call to undefined function of_get_option() in /home/tlyonweb/public_html/bagelsnbeyond/blog/wp-content/themes/vryn-restaurant/footer.php on line 16
    I found the file location in the file manager via CPanal, but I don’t know what to add, delete, or change to correct this error. Also, when I added content in the Theme, Appearance, Footer section for the copyright, nothing shows up, just that fatal error message.
    Here is the php that is for the footer:
    ` <?php
    /**
    * The template for displaying the footer.
    *
    * Contains the closing of the #content div and all content after
    *
    * @package Sixteen
    */
    ?>

    </div><!– #content –>

    <footer id=”colophon” class=”site-footer” role=”contentinfo”>

    <div class=”container”>
    <?php if ( of_get_option(‘credit1’, true) == 0 ) { ?>
    <div class=”site-info”>
    <?php do_action( ‘sixteen_credits’ ); ?>
    VRYN Restaurant By PixelThemes.com
    </div><!– .site-info –>
    <?php } //endif ?>
    <div id=”footertext”>
    <?php
    if ( (function_exists( ‘of_get_option’ ) && (of_get_option(‘footertext2’, true) != 1) ) ) {
    echo of_get_option(‘footertext2’, true); } ?>
    </div>

    </div><!–.container–>
    </footer><!– #colophon –>
    </div><!– #page –>

    <?php wp_footer(); ?>
    </body>
    </html>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The installation on the subdomain is looking for the function of_get_option() but can’t find it. Have a look in your functions.php file and see if you can find this function. It may be because you are on a subdomain it is not finding the correct location.

    I know one thing, this issue is 100% related to the theme as it is part of the Options framework and how the theme was built. Try reinstalling the theme or switching.

    I suppose, that ‘credit1’ located in Sixteen Plus – premium parent theme for VRYN Restaurant. I install VRYN Restaurant on the subdomain and get same error.

    Thread Starter ChuckH58

    (@chuckh58)

    Is there a way for me to add the “function” to the function.php file? Is it generic or theme specific?
    I did not see a function for the footer, just the header.
    Here is the php in the function.php file:

    ` <?php
    /* Enque Google Fonts */

    function vryn_restaurant_fonts() {
    wp_enqueue_style(‘vryn-restaurant-damion’, ‘//fonts.googleapis.com/css?family=Damion’);
    wp_enqueue_style(‘vryn-restaurant-karla’, ‘//fonts.googleapis.com/css?family=Karla:400,400italic,700,700italic’);
    }
    add_action( ‘wp_enqueue_scripts’, ‘vryn_restaurant_fonts’ );

    function vryn_restaurant_styles() {
    wp_dequeue_style( ‘sixteen-basic-style’ );
    wp_dequeue_style( ‘sixteen-layout’ );
    wp_dequeue_style( ‘sixteen-main-style’ );
    wp_enqueue_style( ‘sixteen-basic-style-2’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘sixteen-layout-2’, get_template_directory_uri() . ‘/css/layouts/content-sidebar.css’ );
    wp_enqueue_style( ‘sixteen-main-style-2’, get_template_directory_uri() . ‘/css/main.css’ );
    wp_enqueue_style( ‘vryn-restaurant-main’, get_stylesheet_uri() );
    }
    add_action( ‘wp_enqueue_scripts’, ‘vryn_restaurant_styles’, 20 );

    remove_action( ‘after_setup_theme’, ‘sixteen_custom_header_setup’ );

    function vryn_custom_header_setup() {
    add_theme_support( ‘custom-header’, array(
    ‘default-image’ => get_stylesheet_directory_uri().’/images/tracks.jpg’,
    ‘default-text-color’ => ‘fff’,
    ‘width’ => 1600,
    ‘height’ => 400,
    ‘wp-head-callback’ => ‘sixteen_header_style’,
    ‘admin-head-callback’ => ‘sixteen_admin_header_style’,
    ‘admin-preview-callback’ => ‘sixteen_admin_header_image’,
    ) );
    }
    add_action( ‘after_setup_theme’, ‘vryn_custom_header_setup’);
    ?>

    If I do have to reinstall the theme how do I do it without losing all of my content for the website?
    Any help will be appreciated.

    my version of footer.php without errors and unwanted functions:

    <?php
    /**
    * The template for displaying the footer.
    *
    * Contains the closing of the #content div and all content after
    *
    * @package Sixteen
    */
    ?>

    </div><!– #content –>

    <footer id=”colophon” class=”site-footer” role=”contentinfo”>

    <div class=”container”>
    <div id=”footertext”>

    my text in footer

    </div>
    </div>

    </div><!–.container–>
    </footer><!– #colophon –>
    </div><!– #page –>

    <?php wp_footer(); ?>
    </body>
    </html>

    Before taking any drastic steps try switching your theme to a different one and see what happens.

    If you do need to reinstall the theme then do the following:

    (you won’t lose content as that is contained in the database)

    1) Backup or copy your theme files
    2) Switch theme to 2015 theme
    3) Delete the folder containing the current theme
    4) Download a new version of the theme
    5) Upload the new theme and activate

    Hopefully that will solve it.

    reinstalling theme – not solution in this case

    • This reply was modified 8 years, 1 month ago by WPNuance.
    Thread Starter ChuckH58

    (@chuckh58)

    I copied and pasted your php into my footer.php file replacing what was there and changed the “my text in footer”section to copyright info.
    It works fine now, no error! Thank you so much.
    You are awesome!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Footer error’ is closed to new replies.