maysi
maysi

Reputation: 5517

Wordpress Fatal error: Call to undefined function get_header()

this is my base tag:

<base href="<?php echo get_template_directory_uri(); ?>/" /> 

it seems that this makes me some problems when I klick on a empty link or on an anchor.

enter image description here

my index.php in the theme folder looks like this:

<?php get_header(); ?>
    <main id="index_main" class="maxWidth center">
                ....

Upvotes: 0

Views: 1143

Answers (1)

Alexander O&#39;Mara
Alexander O&#39;Mara

Reputation: 60527

You don't use a WordPress theme by visiting the files under wp-content/themes/ folder. You activate the theme through the admin panel (Appearance > Themes), then the active theme is used through the main website, which you will find under http://www.kwk.de/.

WordPress loads theme files, theme files don't load WordPress.

You also probably don't want to use a base tag, as it may conflict with other WordPress code. Instead, use code like the following to access images, or use CSS background images.

<img src="<?php echo get_template_directory_uri(); ?>/img/img.png" />

Upvotes: 1

Related Questions