• I want integrate the wordpress header in smf template but when I include the wordpress header with the code: [ require(‘../wp-blog-header.php’); ], in the index.template.php file, I got this error message:

    Fatal error: Call to a member function on a non-object in /japgalaxy/wp-includes/functions.php on line 897

    This is the portion of code of functions.php file:

    895 function is_blog_installed() {
    896      global $wpdb;
    897     $wpdb->hide_errors();
    898     $installed = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");
    899     $wpdb->show_errors();
    900     $install_status = !empty( $installed ) ? TRUE : FALSE;
    901      return $install_status;
    902 }

    Where is the problem?

    P.s.: excuse me for my bad english but I’m italian.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter japgalaxy

    (@japgalaxy)

    anyone?

    With the code in the same folder as SMF (meaning, the parent folder is not the same for WP and SMF), SMF is expecting to find the file

    /wp-blog-header.php

    In its own directory. A quick fix would be to include the entire URL for it, which may or may not work. You could also copy the .php file from your WP parent folder to the SMF parent folder so it is available for use, however, I am not by any stretch of the imagination an expert in this regard, and doing it that way may result in two separate headers that do not communicate… and that may not even matter.

    I hope this helps. Let me know how you got it done if it works. I’ve been putting off doing this myself.

    Any news on this post? Can anyone show how this can be done?

    jhhardin – didn’t Jasonian answer the question or am I not understanding your question?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How integrate wordpress header in smf forum’ is closed to new replies.