Hej Jeg prøver at oprette en side som allerede er programmeret færdig, men jeg vil prøve at lave den i wordpress så man kan benytte cms systemet i wordpress, jeg har prøvet at følge denne guide men det virker ikke:
http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-wordpress-theme-from-scratch/
min header.php ser nu sådan ud:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <?php language_attributes() ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<?php wp_head(); ?>
</head>
<body>
<div id="container">
<div id="header">
<p class="description"><?php bloginfo('description'); ?></p>
<h1>/"><?php bloginfo('name'); ?></h1>
<p id="logo"><img src="images/logo.png"/></p>
<p id="navitopline"><img src="images/navitopline.png"/></p>
<p id="navilowerline"><img src="images/navilowerline.png"/></p>
</div>
<div id="navigation">
<?php wp_list_pages('sort_column=menu_order&title_li='); ?>
-
<li id="navi1">Crunch
<li id="navi2">Referencer
<li id="navi3">Team
<!--<li id="gap">
<li id="navi4">Blog-->
<li id="navi5">Kontakt
<div class="clear"></div>
</div>
og min footer:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div id="footer">
<!-- Please leave this line intact -->
<p>Template design by Six Shooter Media
<!-- you can delete below here -->
© <?php the_time('Y'); ?> <?php bloginfo('name'); ?>
">Grab the feed</p>
</div>
</div>
< ?php wp_footer(); ?>
</body>
</html>
og min index.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php get_header(); ?>
<div id="content">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2>"><?php the_title(); ?></h2>
<?php the_content(); ?>
<p><?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> | <?php the_category(', '); ?> | <?php comments_number('No comment', '1 comment', '% comments'); ?></p>
<?php endwhile; else: ?>
<h2>Woops...</h2>
<p>Sorry, no posts we're found.</p>
<?php endif; ?>
<p align="center"><?php posts_nav_link(); ?></p>
</div>
<?php get_footer(); ?>
</body>
</html>
men når jeg prøver at teste min index.php kommer denne fejl:
Fatal error: Call to undefined function get_header() in C:\wamp\www\typography-paramount\index.php on line 10
Er der nogle som ved hvad problemet kan være eller er der nogle som kender en bedre tutorial eller har bedre ideer til hvordan man kan gøre det.
Tak :)