Sistemas Corporativos Web - WordPress Aula03
-
Upload
tersis-zonato -
Category
Design
-
view
1.165 -
download
0
Transcript of Sistemas Corporativos Web - WordPress Aula03
Tersis Zonato2011
Aula 03Sistemas Corporativos Web
•Onde estou?
•O que é apresentado aqui?
•Onde posso ir?
INSTONE (2000)
Elementos básicos
“Qualquer página web dispõe detrês áreas principais”
VEEN (2001)
• index.php: estrutura/código
• style.css: estilo
No mínimo:
• index.php: estrutura/código
• style.css: estilo
• header.php: cabeçalho
• footer.php: rodapé
• sidebar.php: barra lateral
• screenshot.png: imagem/preview do tema
Vamos utilizar:
/wp-content/themes/novotema
Crie o arquivo style.css
/*Theme Name: Nome do temaTheme URI: http://Version: 1.0Description: Lorem IpsumAuthor: FulanoAuthor URI: http://*/
style.css
Copie o arquivo screenshot.png para a pasta:
/wp-content/themes/novotema/
Crie o arquivo header.php
•HTML 4.01 Frameset
•HTML 4.01 Strict
•HTML 4.01 Transitional
<!DOCTYPE>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
header.php
<html>
<head></head>
<body>
header.php
• Inserir na TAG <head>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<title><?php bloginfo('name'); wp_title(); ?></title>
header.php
• Inserir na TAG <head>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php wp_head(); ?>
header.php
<!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"><head profile="http://gmpg.org/xfn/11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<title><?php bloginfo('name'); wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php wp_head(); ?></head>
<body>
header.php básico:
Crie o arquivo footer.php
</body>
</html>
footer.php
Falta o arquivo index.php!!!
<?php get_header(); ?>
<p>Montagem do tema</p>
<?php get_footer(); ?>
index.php
Até o momento...
header.php
index.php
footer.php
Mas onde está oconteúdo dinâmico?
<?phpif (have_posts()) :while (have_posts()) : the_post();
the_title();
endwhile;endif;?>
index.php
<h1> <?php the_title(); ?></h1>
<div class="date"> <?php the_time('d/M/Y . G:i'); ?></div>
<div class="post"> <?php the_content(); ?></div>
index.php