Untitled
why is this happening we are using get_current_Site function in footer.php it is working but smae we are using for header.php file same function it is not working it is in same directory but why this issue is coming <?php /** * The template for displaying the footer. * * @package BxTheme */ use BxTheme\Utility as Utility; use function BxTheme\Utility\setup_gtm_attributes; $logo_attrs = array ( 'tag_name' => 'Page Engagement', 'component_title' => 'Site Navigation Footer', 'component_type' => 'Site Navigation Footer', 'click_text' => 'Blackstone Logo', 'click_url' => wp_parse_url(get_site_url(), PHP_URL_SCHEME) . '://' . wp_parse_url(get_site_url(), PHP_URL_HOST) ); $bx_site = BlackstoneCore\Utility\get_current_site(); echo $bx_site; echo "<br/>"; if ( Utility\is_no_footer_navigation_template() ) { echo "working"; } else { echo "not working"; } $isPws = function_exists( '\BlackstonecomCore\Utility\is_pws_page' ) ? \BlackstonecomCore\Utility\is_pws_page( get_the_ID() ) : false; ?> <?php /** * The template for displaying the header. * * @package BxTheme */ namespace BlackstoneV2; use function BxTheme\Utility\setup_gtm_attributes; use BxTheme\Utility as Utility; $theme_color = ""; $darkHeader = get_post_meta(get_the_ID(), 'bx_dark_theme', true); if( $darkHeader ) { // Executes $theme_color ="is-color-theme-dark"; } echo "<br/>"; $bx_site = BlackstoneCore\Utility\get_current_site(); echo $bx_site; if ( Utility\is_no_header_navigation_template() ) { echo "cc"; } else { echo "not working"; } the issue is coming is below but this is not coming in footer.php please rectify header.php code to work properly Fatal error: Uncaught Error: Call to undefined function BlackstoneV2\BlackstoneCore\Utility\get_current_site() in /var/www/html/wp-content/themes/blackstone-v2/header.php on line 21
Leave a Comment