Fatal Error in wp-content/themes/Newspaper/

Posted in: Newspaper
Post count: 101

Fatal error: Call to undefined function get_header() in /home/muhendisbeyinler/public_html/wp-content/themes/Newspaper/index.php on line 6

it’s going 404 soft in google webmaster tools. How can fix this?

Post count: 22421

Hello,

Please follow this topic as reference and follow use the guide indicated there: https://forum.tagdiv.com/topic/url-error-showing-in-google-search-console-report/

Thank you!

Post count: 101

i dont understand 🙂 https://ardamis.com/2011/06/02/fix-for-php-fatal-error-get_header-in-wordpress/

so i must add this codes in index.php?

<?php ini_set('display_errors', 0); ?>
<?php
/**
* @package WordPress
* @subpackage Ars_Theme
*/
if (function_exists('get_header')) {
get_header();
}else{
/* Redirect browser */
header("Location: http://" . $_SERVER['HTTP_HOST'] . "");
/* Make sure that code below does not get executed when we redirect. */
exit;
}; ?>

Post count: 22421

Hello,
You only need the function from the id statement. This code basicaly creates a redirect from the error to anywhere you want it to redirect.Simply replace get_header from index.php with this part:

if (function_exists('get_header')) {
get_header();
}else{
/* Redirect browser */
header("Location: https://google.com ");
/* Make sure that code below does not get executed when we redirect. */
exit;
};

I set it to redirect to google as an example. You can set it to redirect to your homepage or any other url you want.
I hope this helps.
Thank you!

Post count: 268

Hi Bogdan

I had the same problem, I also tried if it works
It is sure that in this way we are not seo-level problems or something else?

Thanks

Post count: 22421

Hi,
As far as we know this method does not affect SEO but we did not test this thoroughly so I cannot provide a definitive answer. We have not encountered any problems with using this method so I think it’s save to say it won’t have a negative impact.
Thank you!

Post count: 2

Hi I’m also having this issue. I have removed td plugin, deactivated all plugins.
tried reinstalling.

Fatal error: Uncaught Error: Call to undefined method td_block_1::get_all_atts() in /home/deniseal/public_html/lovingthemouse.net/wp-content/themes/Newsmag 2/includes/shortcodes/td_block_1.php:135 Stack trace: #0 /home/deniseal/public_html/lovingthemouse.net/wp-content/themes/Newsmag 2/includes/shortcodes/td_block_1.php(111): td_block_1->inner(Array) #1 /home/deniseal/public_html/lovingthemouse.net/includes/wp_booster/td_global_blocks.php(28): td_block_1->render(Array, ”) #2 /home/deniseal/public_html/lovingthemouse.net/wp-includes/shortcodes.php(319): td_global_blocks::proxy_function(Array, ”, ‘td_block_1’) #3 [internal function]: do_shortcode_tag(Array) #4 /home/deniseal/public_html/lovingthemouse.net/wp-includes/shortcodes.php(197): preg_replace_callback(‘/\\[(\\[?)(td_blo…’, ‘do_shortcode_ta…’, ‘<p>[vc_row][vc_…’) #5 /home/deniseal/public_html/lovingthemouse.net/wp-includes/class-wp-hook.php(286): do_shortcode(‘<p>[vc_row][vc_…’) #6 /home/deniseal/public_html/lovingthemouse.net/wp-includes/plugin.php(203): W in /home/deniseal/public_html/lovingthemouse.net/wp-content/themes/Newsmag 2/includes/shortcodes/td_block_1.php on line 135

Post count: 23312

Hello aliceadenise,

Please notice that our theme works as expected if it was correctly installed. Please try again and install the theme via FTP way, clear all the caches and check the result. For more information, please check our documentation from here -> https://forum.tagdiv.com/requirements-for-newspaper/
After this, if the problem is still there, please send us an email at contact@tagdiv.com with your log-in information (wp-admin) and CPanel access so we further investigate it closer your setup page.

Thanks for your understanding!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.