After installing the plugin and configuring the settings.

After installing the plugin and configuring the settings. I get the error
Your active theme:
Is missing the call to <?php wp_head(); ?> which should appear directly before </head>
Is missing the call to <?php wp_footer(); ?> which should appear directly before </body>

I am not sure what to do. Can you please help me. Thanks

  • Rahul Verma

    Hello,

    I hope you are well today and Thanks for posting on the forums.

    wp_head and wp_footer are essential function a theme must have. It seems that your activated theme is missing these function. To confirm, Please open header.php to see wp_head() function is called just before </head> and open footer.php to see if wp_footer() function is called just before </body> tag.

    If you're not familiar much about programming, please send me FTP details so i can add these function in your theme.

    If you want me to make these changes then please send me the FTP credentials of your site, just send info through our contact form: https://premium.wpmudev.org/contact/
    - Choose "I have a different question"
    - Include my name in the subject "Sandeep Kumar"
    - Include the URL of this post in your message so that I may track this issue better
    - Include any relevant login information (Wordpress admin info username + password )
    - Include FTP Details

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Best Regards
    Sandeep Kumar

    • sam

      Sandeep,

      Thank you so much for your assistance. I have attached the Footer.php and Header.php below so you can see if i have in there what I need. Please let me know if there is any changes I need to make and I can put that in there. Thanks again.

      FOOTER.PHP

      <?php
      if ( !defined('ABSPATH')) exit; // Exit if accessed directly
      /**
      * The template for displaying the footer.
      *
      * Contains all content after the closing of the id=main div
      *
      * @package WordPress
      * @subpackage Weaver II
      * @since Weaver II 1.0
      */
      weaverii_trace_template(__FILE__);
      ?>
      <?php
      if (weaverii_getopt_checked('wii_footer_last')) // move footer outside of page, allows wide footer
      echo("</div><!-- #wrapper -->\n");

      if ((weaverii_use_mobile('mobile') && weaverii_getopt('_wii_mode_mobile') != 'weaver-mobile-smart-stacked')
      || weaverii_getopt('_wii_mode_mobile') == 'weaver-mobile-resp-nostack') {
      weaverii_put_widgetarea('mobile-widget-area', 'mobile_widget_area');
      }

      weaverii_inject_area('prefooter'); // put the prefooter optional area
      if (!weaverii_getopt('wii_hide_footer') && !weaverii_is_checked_page_opt('ttw-hide-footer')) {
      ?>
      <footer id="colophon" role="contentinfo">
      <div>
      <?php
      if (weaverii_getopt_checked( 'wii_footer_inject_move' )) {
      weaverii_inject_area('footer'); // here is where the footer options get inserted
      get_sidebar( 'footer' ); // get the sidebar-footer temeplate
      } else {
      get_sidebar( 'footer' );
      weaverii_inject_area('footer');
      }

      $date = getdate();
      $year = $date['year'];
      ?>
      <div id="site-ig-wrap">
      <span id="site-info">
      <?php
      $cp = weaverii_getopt('_wii_copyright');
      if (strlen($cp) > 0) {
      if ($cp != ' ') // really leave nothing if specify blank
      echo(do_shortcode($cp));
      } else {
      ?>
      © <?php echo($year); ?> - " title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?>
      <?php
      }
      ?>
      </span> <!-- #site-info -->
      <?php
      if (! weaverii_getopt('_wii_hide_poweredby')) { ?>
      <span id="site-generator">
      " title="wordpress.org" rel="generator" target="_blank"><?php printf( __( 'Proudly powered by %s','weaver-ii'), 'WordPress' ); ?> 
      <?php
      echo(WEAVERII_THEMENAME); ?> by <?php weaverii_site(); ?>WP Weaver
      </span> <!-- #site-generator -->
      <?php
      }
      weaverii_mobile_toggle('footer'); // display toggle button
      ?>
      </div><!-- #site-ig-wrap -->
      <div class="weaver-clear"></div>
      </div>
      </footer><!-- #colophon -->
      <?php
      } // end if !hide_footer

      if (!weaverii_getopt_checked('wii_footer_last')) // normally, #colophon inside #page
      echo("</div><!-- #wrapper -->\n");
      weaverii_inject_area('postfooter'); // and this is the end options insertion
      echo "\n";

      if ( !weaverii_getopt_checked('_wii_no_final_div') ) {
      if (weaverii_getopt_checked('wii_hide_final')) {
      echo '<div id="weaver-final" class="weaver-final-normal wvr-hide-bang">';
      } else {
      echo '<div id="weaver-final" class="weaver-final-normal">';
      }
      }
      wp_footer();

      weaverii_masonry('invoke-code');

      if ( !weaverii_getopt_checked('_wii_no_final_div') )
      echo '</div> <!-- #weaver-final -->' . "\n";

      if (weaverii_dev_mode() && weaverii_getopt_checked('_weaverii_diag_timer')) {
      global $weaverii_timer;
      $end_time = microtime(true);
      echo '<span class="wvr-timer-msg">Page generated in: '. round($end_time-$weaverii_timer, 3) . ' seconds.</span>' . "\n";
      }
      ?>
      </body>
      </html>

      HEADER.PHP

      <?php
      if ( !defined('ABSPATH')) exit; // Exit if accessed directly
      /**
      * The Header for our theme.
      *
      * Displays all of the <head> section and everything up till < div id="main" >
      *
      * @package WordPress
      * @subpackage Weaver II
      * @since Weaver II 1.0
      *
      * >>>> DO NOT EDIT THIS FILE <<<<
      *
      * Warning! DO NOT EDIT THIS FILE, or any other theme file! If you edit ANY theme
      * file, all your changes will be LOST when you update the theme to a newer version.
      * Instead, if you need to change theme functionality, CREATE A CHILD THEME!
      *
      * >>>> DO NOT EDIT THIS FILE <<<<
      */
      if (function_exists('weaverii_ts_pp_switch'))
      weaverii_ts_pp_switch();
      weaverii_setup_mobile();
      ?><!DOCTYPE html>
      <!--[if IE 7]> <html id="ie7" <?php language_attributes(); ?>> <![endif]-->
      <!--[if IE 8]> <html id="ie8" <?php language_attributes(); ?>> <![endif]-->
      <!--[if IE 9]> <html id="ie9" <?php language_attributes(); ?>> <![endif]-->
      <!--[if !(IE 6) | !(IE 7) | !(IE 8) ] | !(IE 9) ><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
      <head>
      <meta charset="<?php bloginfo( 'charset' ); ?>" />
      <?php
      $viewport = "<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes' />\n";
      // Need to see if the visitor has opened Full View on a mobile device - use viewport to get full desktop view
      if ((weaverii_sim_mobile() && !weaverii_in_mobile_view())
      || (weaverii_is_mobile() && weaverii_mobile_gettype() != 'tablet')) {
      if (!weaverii_in_mobile_view()) {
      $tw = weaverii_getopt('wii_theme_width_int');
      if (!$tw) $tw = 940;
      $viewport = "<meta name='viewport' content='width=" . $tw . "px, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes' />\n";
      }
      }
      if (weaverii_getopt_checked('wii_theme_width_fixed') || weaverii_getopt_checked('_wii_mobile_disable'))
      $viewport = "<!-- no viewport -->\n";
      echo $viewport;

      // comments_popup_script(400, 500);
      ?>
      <title><?php // ++++++ HEAD TITLE ++++++
      wp_title(''); // the title - will run through our filter
      ?></title>

      <link rel="profile" target="_blank" href="http://gmpg.org/xfn/11" />
      <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
      <?php

      $sheet_dev = get_stylesheet_directory_uri() . '/style.css'; // get style.css
      $sheet = str_replace('.css', WEAVER_MINIFY.'.css',$sheet_dev); // default sheet
      $sheet_file = get_stylesheet_directory() . '/style' . WEAVER_MINIFY . '.css';
      if (! @file_exists($sheet_file))
      $sheet = $sheet_dev; // no style.min.css available (need this check for child themes)
      $sheet_name = 'weaverii-main-style-sheet';

      if (($custom = weaverii_getopt('_wii_custom_style')) != '') { // set which style sheet we are using
      $sheet = $custom;
      $sheet_name = 'weaverii-main-style-sheet-custom';
      } else if (weaverii_getopt_checked('wii_minimial_style')) {
      $sheet = get_template_directory_uri() . '/style-minimal'.WEAVER_MINIFY.'.css';
      $sheet_name = 'weaverii-main-style-sheet-min';
      }

      wp_register_style($sheet_name,$sheet,array(),WEAVERII_VERSION,'all');
      wp_enqueue_style($sheet_name);
      // the mobile style sheet

      if (!weaverii_getopt_checked('_wii_mobile_disable')) {
      $sheet = get_template_directory_uri() . '/style-mobile'.WEAVER_MINIFY.'.css';
      $msheet_name = 'weaverii-mobile-style-sheet';
      wp_register_style($msheet_name,$sheet,array(),WEAVERII_VERSION,'all');
      wp_enqueue_style($msheet_name);
      }
      ?>
      <!--[if lt IE 9]>
      <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
      <![endif]-->

      <?php // ++++ CSS AND CUSTOM SCRIPTS ++++
      $icon = weaverii_getopt('_wii_favicon_url');
      if ($icon != '') {
      $url = apply_filters('weaverii_css',parse_url($icon,PHP_URL_PATH));
      echo "<link rel=\"shortcut icon\" href=\"$url\" />\n";
      }
      $icon = weaverii_getopt('_wii_apple_touch_icon_url');
      if ($icon != '') {
      $url = apply_filters('weaverii_css',parse_url($icon,PHP_URL_PATH));
      echo "<link rel=\"apple-touch-icon\" href=\"$url\" />\n";
      }
      weaverii_facebook_meta();

      if ( !weaverii_use_inline_css(weaverii_get_css_filename()) ) { // don't generate inline CSS
      $vers = weaverii_getopt('wii_style_version');
      if (!$vers) $vers = '1';
      else $vers = sprintf("%d",$vers);
      wp_register_style('weaverii-style-sheet',weaverii_get_css_url(),array($sheet_name),$vers);
      wp_enqueue_style('weaverii-style-sheet');
      }

      weaverii_pro_wp_head(); // anything needed for Pro Version

      wp_head();
      ?>
      </head>

      <body <?php body_class(); ?>>
      <!-- add custom CSS to use this page-bottom link -->
      <?php
      weaverii_trace_template(__FILE__);
      weaverii_trace_mobile();

      if (weaverii_getopt('wii_top_menu_before_wrapper'))
      do_action('weaver_nav','top');

      weaverii_inject_area('prewrapper');

      weaverii_e_notopt('wii_header_first',"<div id=\"wrapper\" class=\"hfeed\">\n"); // put the header before the wrapper?

      weaverii_inject_area('preheader');

      if ( !weaverii_is_checked_page_opt('ttw-hide-header') ) {
      echo "<div id=\"wrap-header\">\n";
      if (!weaverii_getopt('wii_top_menu_before_header') && !weaverii_getopt('wii_top_menu_before_wrapper'))
      do_action('weaver_nav','top');
      ?>
      <header id="branding" role="banner"><div id="branding-content">
      <?php
      /* ======== SITE LOGO and TITLE ======== */
      $title = (weaverii_getopt('_wii_mobile_site_title') && weaverii_use_mobile('mobile') )
      ? esc_html(weaverii_getopt('_wii_mobile_site_title')) : esc_attr( get_bloginfo( 'name', 'display' ) );
      ?>
      <div id="site-logo"></div>
      <div id="site-logo-link" onclick="location.href='<?php echo home_url( '/' ); ?>';"></div>

      <?php
      $h_class = ' class="title-description title-description-xhtml"';
      if ( weaverii_getopt('wii_hide_site_title') || weaverii_is_checked_page_opt('ttw-hide-site-title') ) {
      if (!weaverii_use_mobile('mobile') || weaverii_getopt('wii_hide_site_title_mobile')) {
      $h_class = ' class="title-description-xhtml"';
      }
      }
      if (weaverii_getopt('wii_title_over_header') || weaverii_getopt('wii_desc_over_header'))
      $h_class = ' class="title-description-xhtml"';

      $t_class = weaverii_getopt_checked('wii_title_on_header') ? ' class="title-on-header"' : '';
      ?>
      <div<?php echo $h_class; ?>>
      <h1 id="site-title" <?php echo $t_class; ?>><span>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php echo $title; ?></span></h1>
      <h2 id="site-description"> <?php bloginfo( 'description' ); ?></h2>
      <?php if (($extra = weaverii_getopt('wii_header_html')) != '') {
      $hide_mobile = weaverii_getopt('wii_header_html_hide_mobile') ? 'wvr-hide-mobile-mobile' : '';
      if ($hide_mobile == '' && weaverii_getopt_checked('wii_title_on_header'))
      $hide_mobile = 'title-on-header';
      if ($hide_mobile != '')
      $hide_mobile = ' class="' . $hide_mobile . '"';
      ?>
      <div id="header-extra-html"<?php echo $hide_mobile;?>><?php echo do_shortcode($extra); ?></div>
      <?php
      }
      ?>
      </div>
      <?php
      if (weaverii_getopt('wii_top_menu_before_header') && !weaverii_getopt('wii_top_menu_before_wrapper'))
      do_action('weaver_nav','top');

      weaverii_mobile_toggle('header'); // display toggle button
      weaverii_inject_area('header'); // inject header HTML

      if (!weaverii_getopt('_wii_hdr_widg_afterimg'))
      get_sidebar('header');

      weaveriip_header_insert(); // add W-II Pro injection

      /* The Dynamic Headers shows headers on a per page basis - will also optionally add site link */
      if (function_exists('show_media_header'))
      show_media_header(); // Plugin support: **Dynamic Headers**

      /* ======== HEADER IMAGE ======== */
      global $weaverii_header;

      if ( !( weaverii_is_checked_page_opt('ttw-hide-header-image') && !is_search() )
      && !( weaverii_getopt_checked('wii_normal_hide_header_image') && !weaverii_use_mobile('mobile') )
      && !( weaverii_getopt_checked('wii_mobile_hide_header_image') && weaverii_use_mobile('mobile'))
      || ( weaverii_getopt_checked('wii_ipad_show_header_image') && weaverii_use_mobile('tablet')) ) {

      if ( !weaverii_getopt_checked('wii_hide_header_image')
      && !(weaverii_getopt('wii_hide_header_image_front') && is_front_page() ) ) {

      echo("\t\t<div id=\"header_image\">\n");
      if (weaverii_getopt('wii_link_site_image')) {
      ?>
      " title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
      <?php
      }
      global $weaverii_header;
      /* Check if this is a post or page, if it has a thumbnail, and if it's a big one */
      if ( is_singular()
      && !(weaverii_use_mobile('mobile') && weaverii_getopt('wii_hide_mobile_fi'))
      && !weaverii_getopt('wii_hide_featured_header')
      && has_post_thumbnail( $post->ID )
      && ($image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ) ) /* $src, $width, $height */
      && $image[1] >= $weaverii_header['width']
      ) {
      echo get_the_post_thumbnail( $post->ID, 'full' );
      } else {
      if (weaverii_use_mobile('mobile') && weaverii_getopt('_wii_mobile_header_url')) {
      echo '<img src="' . esc_attr(apply_filters('weaverii_css',weaverii_getopt('_wii_mobile_header_url'))) .
      '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' . "\n";
      } else if (weaverii_use_mobile('tablet') && weaverii_getopt('_wii_mobile_tablet_header_url')) {
      echo '<img src="' . esc_attr(apply_filters('weaverii_css',weaverii_getopt('_wii_mobile_tablet_header_url'))) .
      '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' . "\n";
      } else if (($alt_img = weaverii_getopt('wii_alt_header_img')) != '') {
      if (strstr($alt_img,'<img') === FALSE)
      echo '<img src="' . apply_filters('weaverii_css',esc_attr($alt_img)) .
      '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' . "\n";
      else
      echo esc_attr($alt_img);
      } else {
      $hdr = get_header_image();
      if ($hdr) {
      ?>
      <img src="<?php echo $hdr ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
      <?php
      } else {
      echo '<div class="weaver-clear"></div>'; // needs a clear if not an img
      }
      }
      }
      weaverii_e_opt('wii_link_site_image',"
      \n"); /* need to close link */
      echo("\t\t</div><!-- #header_image -->\n");
      } /* closes header > 0 */
      } /* end wii_hide-header-image */

      if (weaverii_getopt('_wii_hdr_widg_afterimg'))
      get_sidebar('header');
      ?>
      </div></header><!-- #branding-content, #branding -->
      <?php
      /* ======== BOTTOM MENU ======== */
      do_action('weaver_nav','bottom');
      echo "</div> <!-- #wrap-header -->\n";
      if (weaverii_getopt('wii_header_first'))
      echo '<div class="weaver-clear"></div>';
      } // end hide-header
      weaverii_e_opt('wii_header_first', "<div id=\"wrapper\" class=\"hfeed\">\n"); // wrapper after header
      ?>

  • Rahul Verma

    Hello @Sam,

    Thanks for your quick response.

    As you can see, it's very hard to understand this long code. It'd be better if you can please give me FTP details so i can take a look on file.

    You can send info through our contact form: https://premium.wpmudev.org/contact/
    - Choose "I have a different question"
    - Include my name in the subject "Sandeep Kumar"
    - Include the URL of this post in your message so that I may track this issue better
    - Include any relevant login information (Wordpress admin info username + password )
    - Include FTP Details

    Best Regards
    Sandeep Kumar

  • Jack Kitterhing

    Hi there Sam,

    Hope you're well today and sorry to see of the issues your having here.

    I've just checked and can't see a email, did you send it with the same email attached to your account here?

    I have notified @Sandeep Kumar of your reply and will also notify another of our develoeprs @Hoang Ngo for his valuable input.

    If you could the email please to contact(at)wpmudev.org with the subject line Attn: Sandeep Kumar

    Thank you for your patience.

    Kind Regards
    Jack.

  • Rahul Verma

    Hello @Sam

    It seems that you have wp_head and wp_footer already there so you need not to worry about it if popup is working fine for you. Though you can disable this notification by removing following code from wp-content/plugins/popover/testheadfooter.php on line 72

    if ( ! empty( $head_footer_errors ) )
    add_action ( 'admin_notices', 'test_head_footer_notices' );

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Best Regards
    Sandeep Kumar

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.