<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Agência Ênfase &#187; tema</title>
	<atom:link href="http://www.agenciaenfase.com.br/tag/tema/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agenciaenfase.com.br</link>
	<description>Agência Ênfase</description>
	<lastBuildDate>Sun, 19 Dec 2010 15:08:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Desenvolvimento WordPress – Tema – Estruturando</title>
		<link>http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/</link>
		<comments>http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 06:52:53 +0000</pubDate>
		<dc:creator>Murilo</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Curso WordPress]]></category>
		<category><![CDATA[tema]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://enfasetecnologia.com/blog/?p=184</guid>
		<description><![CDATA[Olá, hoje vou dar continuidade ao mini-curso de wordpress chamado de desenvolvimento wordpress, caso queria dar uma olhada no que já foi falado por aqui abaixo os links: Desenvolvimento com WordPress Desenvolvimento WordPress &#8211; Tema Bom hoje vou terminar  cabeçalho (básico), e já dividir a home em 2 colunas “two columns”. Resolvi deixar o desenvolvimento [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.agenciaenfase.com.br%2Fblog%2Fdesenvolvimento-wordpress-tema-estruturando%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.agenciaenfase.com.br%2Fblog%2Fdesenvolvimento-wordpress-tema-estruturando%2F&amp;source=agenciaenfase&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Olá, hoje vou dar continuidade ao mini-curso de wordpress chamado de desenvolvimento wordpress, caso queria dar uma olhada no que já foi falado por aqui abaixo os links:</p>
<ul>
<li><a title="Desenvolvimento com WordPress" href="http://www.agenciaenfase.com.br/blog/wordpress/desenvolvendo-com-o-wordpress/" target="_self">Desenvolvimento com WordPress</a></li>
<li><a title="Desenvolvimento WordPress - Tema" href="http://www.agenciaenfase.com.br/blog/wordpress/desenvolvimento-wordpress-tema/">Desenvolvimento WordPress &#8211; Tema</a></li>
</ul>
<p>Bom hoje vou terminar  cabeçalho (básico), e já dividir a home em 2 colunas “two columns”.</p>
<p>Resolvi deixar o desenvolvimento primeiro, depois a explicação:</p>
<p>header.php  final</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Inicio Pagina <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;page&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Inicio Cabeçalho <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;header&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>h1<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span>?php bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;name&quot;</span><span style="color: #009900;">&#41;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;/</span>h1<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>h2<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span>?php bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;/</span>h2<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>ul<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>li<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php bloginfo(&quot;</span>url<span style="color: #0000ff;">&quot;)?&amp;gt;/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Home&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>Home<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>a<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;/</span>li<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort_column=menu_order&amp;amp;title_li='</span><span style="color: #009900;">&#41;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>ul<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>div<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Fim Cabeçalho <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Essa são as ultimas linhas do arquivo header.php, bem básico nosso cabeçalho, somente para começar a brincar com ele.</p>
<p>Temos:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php bloginfo<span style="color: #009900;">&#40;</span>“name”<span style="color: #009900;">&#41;</span></pre></div></div>

<p>Que nada mais coloca o nome do blog em um h1.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Depois a descrição do blog.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort_column=menu_order&amp;amp;title_li='</span><span style="color: #009900;">&#41;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Um menu para listar a paginas, o padrão é o link Home o resto é dinâmico, wp_list_pages como o nome já sugera “wordpress lista as páginas”.</p>
<p>Importante pensar nos usuários que vão utilizar o tema, deixando o usuário mudar textos, adicionar novas paginas, quando estiver desenvolvendo mantenha o foco no usuário, para deixar cada vez melhor seu trabalho, vendo possibilidades de deixar esses espaços dinâmicos para o wordpress é uma boa!!.</p>
<p>O header.php por enquanto vai ficar assim.</p>
<p>Vamos para o próximo arquivo o sidebar.php sem simples e depois o footer.php também bem simples depois vamos incrementar algumas coisas neles.<br />
sidebar.php</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Inicio Coluna <span style="color: #b1b100;">do</span> lado direito <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sidebar&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>div<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Fim Coluna <span style="color: #b1b100;">do</span> lado direito <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>footer.php</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>div<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Fim Pagina <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>body<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>html<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Até aqui já temos 3 arquivos , o próximo é o index.php.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Inicio Coluna <span style="color: #b1b100;">do</span> meio <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;column&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;posts&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post-id-&amp;lt;?php echo <span style="color: #006699; font-weight: bold;">$post</span>-&amp;gt;ID;?&amp;gt;&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>h3<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php the_permalink();?&amp;gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Link Permanente - &amp;lt;?php the_title();?&amp;gt;&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span>?php the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;/</span>a<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;/</span>h3<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php
the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php comments_popup_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments (0)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments (1)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments (%)'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #339933;">|</span> Enviado por <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>            <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>div<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php
<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span><span style="color: #339933;">:</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>h3<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>Nenhum post cadastrado<span style="color: #339933;">!!&amp;</span>lt<span style="color: #339933;">;/</span>h3<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>div<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!--</span> Fim Coluna <span style="color: #b1b100;">do</span> meio <span style="color: #339933;">--&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
Pega nosso <span style="color: #990000;">header</span><span style="color: #339933;">.</span>php</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Verifica se tem algum post , se tiver ele faz um loop até 10, que é o padrão do wordpress podendo mudar caso tenha necessidade de deixar menos posts por pagina.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #339933;">;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Nessa parte coloquei somente para organização, vamos supor que futuramente precise manipular algum post via javascript por exemplo, vai ficar brincando como o DOM por que ele não foi legal com você ?<br />
Se pensar como será seu modelo de objetos antes de precisar usar eles é bem melhor do que precisar encontrar um objeto sem identificação.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>O link do post.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Titulo</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php comments_popup_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments (0)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments (1)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments (%)'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Link para a pagina de comentários que também vou comentar aqui logo.</p>
<p>Deixei em inglês por que estou usando aqui o wordpress 2.7 já traduzido, então não tem por que mudar já que traduz sozinho =D.</p>
<p>Bom até a próxima</p>
<p><em> </em></p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando+-+http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;t=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando&amp;summary=Ol%C3%A1%2C%20hoje%20vou%20dar%20continuidade%20ao%20mini-curso%20de%20wordpress%20chamado%20de%20desenvolvimento%20wordpress%2C%20caso%20queria%20dar%20uma%20olhada%20no%20que%20j%C3%A1%20foi%20falado%20por%20aqui%20abaixo%20os%20links%3A%0D%0A%0D%0A%09Desenvolvimento%20com%20Wordpress%0D%0A%09Desenvolvimento%20Wordpress%20-%20Tema%0D%0A%0D%0ABom%20hoje%20vou%20terminar%C2%A0%20cabe%C3%A7alho%20%28b%C3%A1sico%29%2C%20e%20j%C3%A1%20divi&amp;source=Agência Ênfase" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/&amp;t=Desenvolvimento+WordPress+%E2%80%93+Tema+%E2%80%93+Estruturando" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema-estruturando/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desenvolvimento WordPress – Tema</title>
		<link>http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/</link>
		<comments>http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 01:38:04 +0000</pubDate>
		<dc:creator>Murilo</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Curso WordPress]]></category>
		<category><![CDATA[desenvolvimento]]></category>
		<category><![CDATA[tema]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://enfasetecnologia.com/blog/?p=168</guid>
		<description><![CDATA[Para continuar a serie Desenvolvimento com WordPress como citei no post. Hoje vou falar como desenvolver um tema simples &#8220;só o cabeçalho&#8221; hoje, partindo do principio que você já tenha um layout do mesmo e está querendo deixar ele dinâmico. O wordpress possui um API grande e bem documentada para consulta, além de fóruns, listas [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.agenciaenfase.com.br%2Fblog%2Fdesenvolvimento-wordpress-tema%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.agenciaenfase.com.br%2Fblog%2Fdesenvolvimento-wordpress-tema%2F&amp;source=agenciaenfase&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Para continuar a serie <a title="Desenvolvimento com WordPress" href="http://enfasetecnologia.com/blog/wordpress/desenvolvendo-com-o-wordpress/">Desenvolvimento com WordPress </a>como citei no post.</p>
<p>Hoje vou falar como desenvolver um tema simples &#8220;só o cabeçalho&#8221; hoje, partindo do principio que você já tenha um layout do mesmo e está querendo deixar ele dinâmico.</p>
<p>O wordpress possui um API grande e bem documentada para consulta, além de fóruns, listas de e-mail e também muitos artigos espalhados pela web.</p>
<p>Abra seu editor predileto e vamos lá =).</p>
<p>Primeiramente no nosso caso irá montar uma pagina inicial do blog.</p>
<p>A antes de começar , acho importante explicar aonde colocar os arquivos , já ia esquecendo :S.</p>
<p>Os arquivos dos temas ficam na pasta /wp-content/themes/ , ali você vai encontrar 2 pastas que vêem por padrão no wordpress , crie uma pasta e coloque o nome do seu tema nela , após isso dentro da pasta crie os seguintes arquivos que vão ser usados.</p>
<ul>
<li>/wp-content/themes/curso_wordpress/index.php</li>
<li> /wp-content/themes/curso_wordpress/header.php</li>
<li> /wp-content/themes/curso_wordpress/footer.php</li>
<li> /wp-content/themes/curso_wordpress/sidebar.php</li>
<li> /wp-content/themes/curso_wordpress/style.css</li>
</ul>
<p>Abaixo o header.php , que contém algumas coisas interessantes.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php language_attributes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>head<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php bloginfo('html_type'); ?&amp;gt;; charset=&amp;lt;?php bloginfo('charset'); ?&amp;gt;&quot;</span> <span style="color: #339933;">/&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>title<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span>?php wp_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;/</span>title<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>style type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/css&quot;</span> media<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;screen&quot;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">@</span>import url<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>style<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alternate&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;application/rss+xml&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;RSS 2.0&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php bloginfo('rss2_url'); ?&amp;gt;&quot;</span> <span style="color: #339933;">/&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alternate&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/xml&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;RSS .92&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php bloginfo('rss_url'); ?&amp;gt;&quot;</span> <span style="color: #339933;">/&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alternate&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;application/atom+xml&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Atom 1.0&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php bloginfo('atom_url'); ?&amp;gt;&quot;</span> <span style="color: #339933;">/&amp;</span>gt<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pingback&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php bloginfo('pingback_url'); ?&amp;gt;&quot;</span> <span style="color: #339933;">/&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php wp_get_archives<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=postbypost&amp;amp;format=link&amp;amp;limit=10'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php wp_head<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;/</span>head<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>body<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<p>Logo no inicio vemos &lt;?php language_attributes();?&gt; que nada mais informa qual língua do documento “pt-br” por exemplo.</p>
<p>Depois já colocamos o content-type do documento.<br />
&lt;?php bloginfo(&#8216;html_type&#8217;);?&gt; tipo do documento text/html<br />
&lt;?php bloginfo(&#8216;charset&#8217;); ?&gt; charset do documento por exemplo utf-8 “O mais recomendado pelo W3C”.</p>
<p>Depois colocamos o titulo da pagina.</p>
<p>&lt;?php wp_title(); ?&gt; aqui é o titulo do seu post ,pagina , arquivos etc , é preenchido automáticamente pelo wordpress.</p>
<p>&lt;?php bloginfo(&#8216;name&#8217;); ?&gt; Nome do blog pode ser alterado no wp-admin.</p>
<p>Nas próximas linhas temos o RSS , ATOM.</p>
<p>&lt;?php bloginfo(&#8216;pingback_url&#8217;); ?&gt; esse daqui é quando estamos citando algum outro site ele funciona em parceria com o trackback , ou seja, o pingback avisa que estou postando alguma coisa sobre terminada postagem e o trackback é responsável por receber esse aviso.</p>
<p>Logo depois temos &lt;?php wp_get_archives(&#8216;type=postbypost&amp;format=link&amp;limit=10&#8242;); ?&gt; que vai  gerar &lt;link das postagens no cabeçalho , se alguém já usou o Plone por exemplo verá que ele faz isso por padrão para deixar de fácil acesso para mecanismos de busca  , você pode trocar o limit e type . No caso o format pode trocar também se for usa-lo em outro lugar que não seja o header.</p>
<p>Por fim temos o &lt;?php wp_header();?&gt; que é de muita utilidade para colocar conteúdo dinamicamente no &lt;head&gt; ,  por exemplo um css que queria colocar:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> novo_css<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&amp;lt;style tye='text/css'&amp;gt;
.novo{
color:#FFFFFF;
}
&amp;lt;/style&amp;gt;
&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'novo_css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>O exemplo acima é a inserção do css no header atravez de um plugin com o add_action(‘wp_head’,’novo_css’) , primeiro parâmetro é o nome da função que vamos adicionar o css , o segundo é o nome da função.</p>
<p>O add_action é muito utilizado , para fazer uso do mesmo somente precisa ter um local aonde ele vai ser inserido que no nosso exemplo é no wp_head().</p>
<p>Nosso próximo passo é a index.php que vamos falar sobre como construir um index dinâmico , logo após uma parte “lateral e por fim um footer “rodapé”.</p>
<p>Até a próxima.</p>
<p><em>Autor: Murilo de Souza Lopes</em></p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Desenvolvimento+WordPress+%E2%80%93+Tema+-+http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;t=Desenvolvimento+WordPress+%E2%80%93+Tema" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;title=Desenvolvimento+WordPress+%E2%80%93+Tema&amp;summary=Para%20continuar%20a%20serie%20Desenvolvimento%20com%20Wordpress%20como%20citei%20no%20post.%0D%0A%0D%0AHoje%20vou%20falar%20como%20desenvolver%20um%20tema%20simples%20%22s%C3%B3%20o%20cabe%C3%A7alho%22%20hoje%2C%20partindo%20do%20principio%20que%20voc%C3%AA%20j%C3%A1%20tenha%20um%20layout%20do%20mesmo%20e%20est%C3%A1%20querendo%20deixar%20ele%20din%C3%A2mico.%0D%0A%0D%0AO%20wordpress%20possui%20um%20API%20grande%20e%20bem%20documenta&amp;source=Agência Ênfase" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/&amp;t=Desenvolvimento+WordPress+%E2%80%93+Tema" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.agenciaenfase.com.br/blog/desenvolvimento-wordpress-tema/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.agenciaenfase.com.br @ 2012-02-05 18:29:44 -->
