<?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>W-Pedia - Wikipedia Wordpress BR</title>
	<atom:link href="http://artesplasticas.art.br/wpedia/feed/" rel="self" type="application/rss+xml" />
	<link>http://artesplasticas.art.br/wpedia</link>
	<description>Biblioteca de códigos com dicas para criar sites e blogs em Wordpress</description>
	<lastBuildDate>Fri, 30 Mar 2012 16:51:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Código para exibir título na tag:title no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/colcoar-codigo-para-exibir-o-titulo-no-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/colcoar-codigo-para-exibir-o-titulo-no-wordpress/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 16:50:25 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=726</guid>
		<description><![CDATA[O ódigo abaixo serve para fazer correções na primeira versão do tema padrão do WordPress Twentyeleven. &#60;title&#62;&#60;?php global $page, $paged; $site_description = get_bloginfo( 'description', 'display' ); if ( is_home() &#124;&#124; is_front_page()) { bloginfo( 'name' ); echo &#34; &#124; $site_description&#34;; } else { wp_title( '', true, 'right' ); // Add a page number if necessary: if [...]]]></description>
			<content:encoded><![CDATA[<p>O ódigo abaixo serve para fazer correções na primeira versão do tema padrão do WordPress Twentyeleven.</p>
<pre class="brush: php; title: ;">
&lt;title&gt;&lt;?php
global $page, $paged;
$site_description = get_bloginfo( 'description', 'display' );

if ( is_home() || is_front_page()) {
bloginfo( 'name' );
echo &quot; | $site_description&quot;;
} else {
wp_title( '', true, 'right' );

// Add a page number if necessary:
if ( $paged &gt;= 2 || $page &gt;= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
}
?&gt;&lt;/title&gt;
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fcolcoar-codigo-para-exibir-o-titulo-no-wordpress%2F&amp;title=C%C3%B3digo%20para%20exibir%20t%C3%ADtulo%20na%20tag%3Atitle%20no%20WordPress" id="wpa2a_2">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/colcoar-codigo-para-exibir-o-titulo-no-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excluir posts na função query_posts do WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/excluir-posts-na-funcao-query_posts-do-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/excluir-posts-na-funcao-query_posts-do-wordpress/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 21:25:35 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[post__not_in]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=720</guid>
		<description><![CDATA[Para excluir o post aberto da página atual de uma lista na mesma tela, use o comando abaixo: &#60;?php $id_post = get_the_ID(); ?&#62; &#60;?php query_posts( array( 'post_type' =&#62; 'procedimento',  'orderby' =&#62; 'date', 'order' =&#62; 'DESC', 'showposts' =&#62; 3, 'post__not_in' =&#62; array($id_post)) );?&#62; &#60;?php if(have_posts()) : ?&#62;&#60;?php while(have_posts()) : the_post() ?&#62; .... O comando &#8216;post__not_in&#8217; =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Para excluir o post aberto da página atual de uma lista na mesma tela, use o comando abaixo:</p>
<pre class="brush: php; title: ;">
&lt;?php $id_post = get_the_ID(); ?&gt;
&lt;?php query_posts( array( 'post_type' =&gt; 'procedimento',  'orderby' =&gt; 'date', 'order' =&gt; 'DESC', 'showposts' =&gt; 3, 'post__not_in' =&gt; array($id_post)) );?&gt;

&lt;?php if(have_posts()) : ?&gt;&lt;?php while(have_posts()) : the_post() ?&gt;
....</pre>
<p>O comando &#8216;post__not_in&#8217; =&gt; array($id_post) pode ser usado com um array de posts para serem excluídos da página.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fexcluir-posts-na-funcao-query_posts-do-wordpress%2F&amp;title=Excluir%20posts%20na%20fun%C3%A7%C3%A3o%20query_posts%20do%20WordPress" id="wpa2a_4">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/excluir-posts-na-funcao-query_posts-do-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Função para limitar títulos do post no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/funcao-para-limitar-titulos-do-post-no-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/funcao-para-limitar-titulos-do-post-no-wordpress/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 00:34:32 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Functions]]></category>
		<category><![CDATA[Páginas]]></category>
		<category><![CDATA[the_title()]]></category>
		<category><![CDATA[title_limite()]]></category>
		<category><![CDATA[Titulo da página]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=713</guid>
		<description><![CDATA[Para criar uma função de limitar a quantidade de caracteres em um título nos arquivos do WordPress, coloque o código abaixo no arquivo functions.php do seu tema: ////////////////////////////////////////////////////////////////////////// ///     Limita o título dos posts na quantidade de caracteres desejado  ///// //////////////////////////////////////////////////////////////////////// function title_limite($maximo) { $title = get_the_title(); if ( strlen($title) &#62; $maximo ) { [...]]]></description>
			<content:encoded><![CDATA[<p>Para criar uma função de limitar a quantidade de caracteres em um título nos arquivos do WordPress, coloque o código abaixo no arquivo functions.php do seu tema:</p>
<pre class="brush: php; title: ;">//////////////////////////////////////////////////////////////////////////
///     Limita o título dos posts na quantidade de caracteres desejado  /////
////////////////////////////////////////////////////////////////////////

function title_limite($maximo) {
$title = get_the_title();
if ( strlen($title) &gt; $maximo ) {
$continua = '...';
}
$title = mb_substr( $title, 0, $maximo, 'UTF-8' );
echo $title.$continua;
}
// para chamar a função use title_limite(20);
</pre>
<p>Para chamar a função use o comando title_limite(), coloque a quantidade de caracteres dentro dos parenteses, abaixo um exemplo:</p>
<pre class="brush: php; title: ;">&lt;h2&gt;
&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;
&lt;?php title_limite(38); ?&gt;
&lt;/a&gt;
&lt;/h2&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Ffuncao-para-limitar-titulos-do-post-no-wordpress%2F&amp;title=Fun%C3%A7%C3%A3o%20para%20limitar%20t%C3%ADtulos%20do%20post%20no%20WordPress" id="wpa2a_6">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/funcao-para-limitar-titulos-do-post-no-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diagrama de hierarquia de um template WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/diagrama-de-hierarquia-de-um-template-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/diagrama-de-hierarquia-de-um-template-wordpress/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 21:16:23 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>
		<category><![CDATA[Diagrama template]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=704</guid>
		<description><![CDATA[http://codex.wordpress.org/images/1/18/Template_Hierarchy.png]]></description>
			<content:encoded><![CDATA[<p><a href="http://artesplasticas.art.br/wpedia/wp-content/uploads/2011/12/Template_Hierarchy1.png"><img class="alignnone size-medium wp-image-705" title="Template Hierarchy WordPress" src="http://artesplasticas.art.br/wpedia/wp-content/uploads/2011/12/Template_Hierarchy-300x297.png" alt="" width="430" height="425" /></a></p>
<p><a href="http://codex.wordpress.org/images/1/18/Template_Hierarchy.png" target="_blank">http://codex.wordpress.org/images/1/18/Template_Hierarchy.png</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fdiagrama-de-hierarquia-de-um-template-wordpress%2F&amp;title=Diagrama%20de%20hierarquia%20de%20um%20template%20WordPress" id="wpa2a_8">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/diagrama-de-hierarquia-de-um-template-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paginação no WordPress sem uso de plug-in</title>
		<link>http://artesplasticas.art.br/wpedia/paginacao-no-wordpress-sem-uso-de-plug-in/</link>
		<comments>http://artesplasticas.art.br/wpedia/paginacao-no-wordpress-sem-uso-de-plug-in/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 13:46:12 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>
		<category><![CDATA[Paginação]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=697</guid>
		<description><![CDATA[Coloque o código abaixo no arquivo functions.php do seu tema: ////////////////////////////////////////////////////////////////////////// ///        FUNCAO PARA FAZER PAGINAÇÃO                                  ///// //////////////////////////////////////////////////////////////////////// function wp_corenavi() { global $wp_query, $wp_rewrite; $pages = ''; $max = $wp_query-&#62;max_num_pages; if (!$current = get_query_var('paged')) $current = 1; $a['base'] = str_replace(999999999, '%#%', get_pagenum_link(999999999)); $a['total'] = $max; $a['current'] [...]]]></description>
			<content:encoded><![CDATA[<pre>Coloque o código abaixo no arquivo functions.php do seu tema:
<pre class="brush: php; title: ;">

//////////////////////////////////////////////////////////////////////////
///        FUNCAO PARA FAZER PAGINAÇÃO                                  /////
////////////////////////////////////////////////////////////////////////
function wp_corenavi() {
global $wp_query, $wp_rewrite;
$pages = '';
$max = $wp_query-&gt;max_num_pages;
if (!$current = get_query_var('paged')) $current = 1;
$a['base'] = str_replace(999999999, '%#%', get_pagenum_link(999999999));
$a['total'] = $max;
$a['current'] = $current;

$total = 1; //1 - display the text &quot;Page N of N&quot;, 0 - not display
$a['mid_size'] = 5; //how many links to show on the left and right of the current
$a['end_size'] = 1; //how many links to show in the beginning and end
$a['prev_text'] = '&amp;laquo; Anterior'; //text of the &quot;Previous page&quot; link
$a['next_text'] = 'PrÃ³xima &amp;raquo;'; //text of the &quot;Next page&quot; link

if ($max &gt; 1) echo '&lt;div&gt;';
if ($total == 1 &amp;&amp; $max &gt; 1) $pages = '&lt;span&gt;PÃ¡gina ' . $current . ' de ' . $max . '&lt;/span&gt;'.&quot;\r\n&quot;;
echo $pages . paginate_links($a);
if ($max &gt; 1) echo '&lt;/div&gt;';
} </pre>
<p>Para ativar a função nas páginas que devem entrar a páginação coloque o código abaixo:</p>
<pre class="brush: php; title: ;"> if (function_exists('wp_corenavi')) wp_corenavi(); </pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fpaginacao-no-wordpress-sem-uso-de-plug-in%2F&amp;title=Pagina%C3%A7%C3%A3o%20no%20WordPress%20sem%20uso%20de%20plug-in" id="wpa2a_10">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/paginacao-no-wordpress-sem-uso-de-plug-in/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Criar um Breadcrumbs (menu migalhas) sem plug-in no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/criar-menu-breadcrumbs-menu-migalhas-sem-plug-in-no-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/criar-menu-breadcrumbs-menu-migalhas-sem-plug-in-no-wordpress/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 19:37:54 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=692</guid>
		<description><![CDATA[Para criar breadcrumbs wordpress em seu site copie e cole o código abaixo no arquivo functions.php do seu tema: //////////////////////////////////////////////////////////////////////// // BREADCRUMBS //////////////////////////////////////////////////////////////////////// function dimox_breadcrumbs() { $delimiter = '&#38;raquo;'; $home = 'InÃ­cio'; // text for the 'Home' link $before = '&#60;span&#62;'; // tag before the current crumb $after = '&#60;/span&#62;'; // tag after the current crumb [...]]]></description>
			<content:encoded><![CDATA[<p>Para criar breadcrumbs wordpress em seu site copie e cole o código abaixo no arquivo functions.php do seu tema:</p>
<pre class="brush: php; title: ;">
////////////////////////////////////////////////////////////////////////
// BREADCRUMBS
////////////////////////////////////////////////////////////////////////

function dimox_breadcrumbs() {

$delimiter = '&amp;raquo;';
$home = 'InÃ­cio'; // text for the 'Home' link
$before = '&lt;span&gt;'; // tag before the current crumb
$after = '&lt;/span&gt;'; // tag after the current crumb

if ( !is_home() &amp;&amp; !is_front_page() || is_paged() ) {

echo '&lt;div id=&quot;crumbs&quot;&gt;';

global $post;
$homeLink = get_bloginfo('url');
echo '&lt;a href=&quot;' . $homeLink . '&quot; rel=&quot;home&quot; title=&quot;' . $home . '&quot;&gt;' . $home . '&lt;/a&gt; ' . $delimiter . ' ';

if ( is_category() ) {
global $wp_query;
$cat_obj = $wp_query-&gt;get_queried_object();
$thisCat = $cat_obj-&gt;term_id;
$thisCat = get_category($thisCat);
$parentCat = get_category($thisCat-&gt;parent);
if ($thisCat-&gt;parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));
echo $before . 'Archive by category &quot;' . single_cat_title('', false) . '&quot;' . $after;

} elseif ( is_day() ) {
echo '&lt;a href=&quot;' . get_year_link(get_the_time('Y')) . '&quot; rel=&quot;bookmark&quot; title=&quot;'.get_the_time('Y').'&quot;&gt;' . get_the_time('Y') . '&lt;/a&gt; ' . $delimiter . ' ';
echo '&lt;a href=&quot;' . get_month_link(get_the_time('Y'),get_the_time('m')) . '&quot; rel=&quot;bookmark&quot; title=&quot;'.get_the_time('F').'&quot;&gt;' . get_the_time('F') . '&lt;/a&gt; ' . $delimiter . ' ';
echo $before . get_the_time('d') . $after;

} elseif ( is_month() ) {
echo '&lt;a href=&quot;' . get_year_link(get_the_time('Y')) . '&quot; rel=&quot;bookmark&quot; title=&quot;'.get_the_time('Y').'&quot;&gt;' . get_the_time('Y') . '&lt;/a&gt; ' . $delimiter . ' ';
echo $before . get_the_time('F') . $after;

} elseif ( is_year() ) {
echo $before . get_the_time('Y') . $after;

} elseif ( is_single() &amp;&amp; !is_attachment() ) {
if ( get_post_type() != 'post' ) {
$post_type = get_post_type_object(get_post_type());
$slug = $post_type-&gt;rewrite;
echo '&lt;a href=&quot;' . $homeLink . '/' . $slug['slug'] . '/&quot; rel=&quot;bookmark&quot; title=&quot;'.$post_type-&gt;labels-&gt;singular_name.'&quot;&gt;' . $post_type-&gt;labels-&gt;singular_name . '&lt;/a&gt; ' . $delimiter . ' ';
echo $before . get_the_title() . $after;
} else {
$cat = get_the_category(); $cat = $cat[0];
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
echo $before . get_the_title() . $after;
}

} elseif ( !is_single() &amp;&amp; !is_page() &amp;&amp; get_post_type() != 'post' &amp;&amp; !is_404() ) {
$post_type = get_post_type_object(get_post_type());
echo $before . $post_type-&gt;labels-&gt;singular_name . $after;

} elseif ( is_attachment() ) {
$parent = get_post($post-&gt;post_parent);
$cat = get_the_category($parent-&gt;ID); $cat = $cat[0];
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
echo '&lt;a href=&quot;' . get_permalink($parent) . '&quot; rel=&quot;bookmark&quot; title=&quot;'.$parent-&gt;post_title.'&quot;&gt;' . $parent-&gt;post_title . '&lt;/a&gt; ' . $delimiter . ' ';
echo $before . get_the_title() . $after;

} elseif ( is_page() &amp;&amp; !$post-&gt;post_parent ) {
echo $before . get_the_title() . $after;

} elseif ( is_page() &amp;&amp; $post-&gt;post_parent ) {
$parent_id  = $post-&gt;post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '&lt;a href=&quot;' . get_permalink($page-&gt;ID) . '&quot; rel=&quot;bookmark&quot; title=&quot;'.get_the_title($page-&gt;ID).'&quot;&gt;' . get_the_title($page-&gt;ID) . '&lt;/a&gt;';
$parent_id  = $page-&gt;post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';
echo $before . get_the_title() . $after;

} elseif ( is_search() ) {
echo $before . 'Search results for &quot;' . get_search_query() . '&quot;' . $after;

} elseif ( is_tag() ) {
echo $before . 'Posts tagged &quot;' . single_tag_title('', false) . '&quot;' . $after;

} elseif ( is_author() ) {
global $author;
$userdata = get_userdata($author);
echo $before . 'Articles posted by ' . $userdata-&gt;display_name . $after;

} elseif ( is_404() ) {
echo $before . 'Error 404' . $after;
}

if ( get_query_var('paged') ) {
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
echo __('Page') . ' ' . get_query_var('paged');
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
}

echo '&lt;/div&gt;';

}
} // end dimox_breadcrumbs()
</pre>
<p>Para exibir o menu Breadcrumbie no site, coloque o código abaixo nos arquivos do tema no qual deseja exibir o menu. Normalmente coloco nos arquivos page.php, single.php e outros.</p>
<pre class="brush: php; title: ;">
&lt;?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?&gt;
</pre>
<p>Fonte:<br />
<a href="http://dimox.net/wordpress-pagination-without-a-plugin-wp-pagenavi-alternative/" target="_blank">http://dimox.net/wordpress-pagination-without-a-plugin-wp-pagenavi-alternative/</a></pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fcriar-menu-breadcrumbs-menu-migalhas-sem-plug-in-no-wordpress%2F&amp;title=Criar%20um%20Breadcrumbs%20%28menu%20migalhas%29%20sem%20plug-in%20no%20WordPress" id="wpa2a_12">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/criar-menu-breadcrumbs-menu-migalhas-sem-plug-in-no-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Registrar campos personalizados em comum para páginas, posts e customposts no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/registrar-campos-personalizados-em-comum-para-paginas-posts-e-customposts-no-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/registrar-campos-personalizados-em-comum-para-paginas-posts-e-customposts-no-wordpress/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 16:49:24 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Custom Post Types]]></category>
		<category><![CDATA[Campos Personalizados]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=682</guid>
		<description><![CDATA[O código abaixo deve ser colocado no arquivo functions.php do seu tema. O código abaixo registra três campos personalizados referêntes a uma data (Dia, Mês e Ano) nos posts, nas páginas e em um custompost chamado novidades. // Registrando um campos personalizados para todas as páginas e posts do sistema $theme_metaboxes_restritos = array( &#34;dia&#34; =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>O código abaixo deve ser colocado no arquivo functions.php do seu tema. O código abaixo registra três campos personalizados referêntes a uma data (Dia, Mês e Ano) nos posts, nas páginas e em um custompost chamado novidades.</p>
<pre class="brush: php; title: ;">// Registrando um campos personalizados para todas as páginas e posts do sistema
$theme_metaboxes_restritos = array(
&quot;dia&quot; =&gt; array (
&quot;name&quot;      =&gt; &quot;dia&quot;,
&quot;default&quot;   =&gt; &quot;&quot;,
&quot;label&quot;     =&gt; __('Selecione o dia', 'mytheme'),
&quot;type&quot;      =&gt; &quot;select&quot;,
&quot;stilo&quot;      =&gt; &quot;width:150px;&quot;
),

&quot;mes&quot; =&gt; array (
&quot;name&quot;      =&gt; &quot;mes&quot;,
&quot;default&quot;   =&gt; &quot;&quot;,
&quot;label&quot;     =&gt; __('Selecione o mÃªs', 'mytheme'),
&quot;type&quot;      =&gt; &quot;select&quot;,
&quot;stilo&quot;      =&gt; &quot;width:250px;&quot;
),

&quot;ano&quot; =&gt; array (
&quot;name&quot;      =&gt; &quot;ano&quot;,
&quot;default&quot;   =&gt; &quot;&quot;,
&quot;label&quot;     =&gt; __('Selecione o ano', 'mytheme'),
&quot;type&quot;      =&gt; &quot;select&quot;,
&quot;stilo&quot;      =&gt; &quot;width:150px;&quot;
)

);

// Registra um custom post select
function custom_fields_box_content_restritos() {
global $post, $theme_metaboxes_restritos;
foreach ($theme_metaboxes_restritos as $theme_metabox) {
$theme_metaboxvalue = get_post_meta($post-&gt;ID,$theme_metabox[&quot;name&quot;],true);
if ($theme_metaboxvalue == &quot;&quot; || !isset($theme_metaboxvalue)) {
$theme_metaboxvalue = $theme_metabox['default'];
}

echo &quot;\t&quot;.'&lt;p&gt;';
echo &quot;\t\t&quot;.'&lt;label for=&quot;'.$theme_metabox['name'].'&quot;style=&quot;font-weight:bold; &quot;&gt;'.$theme_metabox['label'].':&lt;/label&gt;&lt;br&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;select name=&quot;'.$theme_metabox['name'].'&quot; id=&quot;'.$theme_metabox['name'].'&quot; style=&quot;'.$theme_metabox['stilo'].'&quot;/&gt;'.&quot;\n&quot;;

if ($theme_metabox['name'] == &quot;dia&quot;){
if($theme_metaboxvalue != &quot;&quot;) {
echo &quot;\t\t&quot;.'&lt;option value=&quot;'.$theme_metaboxvalue.'&quot; selected /&gt;'.$theme_metaboxvalue.'&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;&quot; /&gt;Selecione...&lt;/option&gt;'.&quot;\n&quot;;
}
else echo &quot;\t\t&quot;.'&lt;option value=&quot;&quot; selected /&gt;Selecione...&lt;/option&gt;'.&quot;\n&quot;;

echo &quot;\t\t&quot;.'&lt;option value=&quot;1&quot; /&gt;1&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;2&quot; /&gt;2&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;3&quot; /&gt;3&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;4&quot; /&gt;4&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;5&quot; /&gt;5&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;6&quot; /&gt;6&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;7&quot; /&gt;7&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;8&quot; /&gt;8&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;9&quot; /&gt;9&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;10&quot; /&gt;10&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;11&quot; /&gt;11&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;12&quot; /&gt;12&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;13&quot; /&gt;13&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;14&quot; /&gt;14&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;15&quot; /&gt;15&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;16&quot; /&gt;16&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;17&quot; /&gt;17&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;18&quot; /&gt;18&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;19&quot; /&gt;19&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;20&quot; /&gt;20&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;21&quot; /&gt;21&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;22&quot; /&gt;22&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;23&quot; /&gt;23&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;24&quot; /&gt;24&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;25&quot; /&gt;25&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;26&quot; /&gt;26&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;27&quot; /&gt;27&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;28&quot; /&gt;28&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;29&quot; /&gt;29&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;30&quot; /&gt;30&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;31&quot; /&gt;31&lt;/option&gt;'.&quot;\n&quot;;
}

if ($theme_metabox['name'] == &quot;mes&quot;){
if($theme_metaboxvalue != &quot;&quot;) {
echo &quot;\t\t&quot;.'&lt;option value=&quot;'.$theme_metaboxvalue.'&quot; selected /&gt;'.$theme_metaboxvalue.'&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;&quot; /&gt;Selecione...&lt;/option&gt;'.&quot;\n&quot;;
}
else echo &quot;\t\t&quot;.'&lt;option value=&quot;&quot; selected /&gt;Selecione...&lt;/option&gt;'.&quot;\n&quot;;

echo &quot;\t\t&quot;.'&lt;option value=&quot;01&quot; /&gt;janeiro&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;02&quot; /&gt;fevereiro&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;03&quot; /&gt;marÃ§o&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;04&quot; /&gt;abril&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;05&quot; /&gt;maio&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;06&quot; /&gt;junho&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;07&quot; /&gt;julho&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;08&quot; /&gt;agosto&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;09&quot; /&gt;setembro&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;10&quot; /&gt;outubro&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;11&quot; /&gt;novembro&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;12&quot; /&gt;dezembro&lt;/option&gt;'.&quot;\n&quot;;
}

if ($theme_metabox['name'] == &quot;ano&quot;){
$ano_seguinte = date(&quot;Y&quot;) + 1;

if($theme_metaboxvalue != &quot;&quot;) {
echo &quot;\t\t&quot;.'&lt;option value=&quot;'.$theme_metaboxvalue.'&quot; selected /&gt;'.$theme_metaboxvalue.'&lt;/option&gt;'.&quot;\n&quot;;

}
else echo &quot;\t\t&quot;.'&lt;option value=&quot;'.date(&quot;Y&quot;).'&quot; selected /&gt;'.date(&quot;Y&quot;).'&lt;/option&gt;'.&quot;\n&quot;;
echo &quot;\t\t&quot;.'&lt;option value=&quot;'.$ano_seguinte.'&quot; /&gt;'.$ano_seguinte.'&lt;/option&gt;'.&quot;\n&quot;;

}

echo &quot;\t\t&lt;/select&gt;&lt;/p&gt;\n&quot;;
echo &quot;\t\t&lt;p&gt;&quot;.$theme_metabox['desc'].'&lt;/p&gt;'.&quot;\n&quot;;
}
}

function custom_fields_box_projetos() {
if ( function_exists('add_meta_box') ) {
add_meta_box('theme-settings',__('ConfiguraÃ§Ãµes', 'mytheme'),'custom_fields_box_content_restritos','page','normal','high');
add_meta_box('theme-settings',__('ConfiguraÃ§Ãµes', 'mytheme'),'custom_fields_box_content_restritos','post','normal','high');
add_meta_box('theme-settings',__('ConfiguraÃ§Ãµes', 'mytheme'),'custom_fields_box_content_restritos','novidades','normal','high');
}
}

add_action('admin_menu', 'custom_fields_box_projetos');

function custom_fields_insert_restritos($pID) {
global $theme_metaboxes_restritos;
foreach ($theme_metaboxes_restritos as $theme_metabox) {
$var = $theme_metabox[&quot;name&quot;];
if (isset($_POST[$var])) {
if( get_post_meta( $pID, $theme_metabox[&quot;name&quot;] ) == &quot;&quot; )
add_post_meta($pID, $theme_metabox[&quot;name&quot;], $_POST[$var], true );
elseif($_POST[$var] != get_post_meta($pID, $theme_metabox[&quot;name&quot;], true))
update_post_meta($pID, $theme_metabox[&quot;name&quot;], $_POST[$var]);
elseif($_POST[$var] == &quot;&quot;)
delete_post_meta($pID, $theme_metabox[&quot;name&quot;], get_post_meta($pID, $theme_metabox[&quot;name&quot;], true));
}
}
}

add_action('wp_insert_post', 'custom_fields_insert_restritos');</pre>
<p>Para pegar os valores dos campos personalizados dentro de posts, páginas ou customposts use o código dentro do loop do WordPress:</p>
<pre class="brush: php; title: ;"> //Pega os campos personalizados
 $dia = get_post_meta($post-&gt;ID, 'dia', true);
 $mes = get_post_meta($post-&gt;ID, 'mes', true);
 $ano = get_post_meta($post-&gt;ID, 'ano', true); </pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fregistrar-campos-personalizados-em-comum-para-paginas-posts-e-customposts-no-wordpress%2F&amp;title=Registrar%20campos%20personalizados%20em%20comum%20para%20p%C3%A1ginas%2C%20posts%20e%20customposts%20no%20WordPress" id="wpa2a_14">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/registrar-campos-personalizados-em-comum-para-paginas-posts-e-customposts-no-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usar as funções do WordPress dentro de um arquivo que esta fora do tema</title>
		<link>http://artesplasticas.art.br/wpedia/usar-as-funcoes-do-wordpress-dentro-de-um-arquivo-que-esta-fora-do-tema/</link>
		<comments>http://artesplasticas.art.br/wpedia/usar-as-funcoes-do-wordpress-dentro-de-um-arquivo-que-esta-fora-do-tema/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 17:51:57 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=679</guid>
		<description><![CDATA[Para usar as funções do WordPress em qualquer arquivo fora do tema basta incluir o arquivo wp-blog-header.php que fica na raiz da instalação do WordPress.  Use o código abaixo: &#60;?php /* Usar as funções do WordPress dentro de um arquivo fora do tema */ define('WP_USE_THEMES', false); require('wp-blog-header.php'); ?&#62; Para usar um arquivo que não pertence [...]]]></description>
			<content:encoded><![CDATA[<p>Para usar as funções do WordPress em qualquer arquivo fora do tema basta incluir o arquivo <strong>wp-blog-header.php</strong> que fica na raiz da instalação do WordPress.  Use o código abaixo:</p>
<pre class="brush: php; title: ;">&lt;?php
 /* Usar as funções do WordPress dentro de um arquivo fora do tema */
 define('WP_USE_THEMES', false);
 require('wp-blog-header.php');
 ?&gt;</pre>
<p>Para usar um arquivo que não pertence ao tema que esteja na pasta do tema basta colcoar o caminho completo do arquivo <strong>wp-blog-header.php</strong>, veja:</p>
<pre class="brush: php; title: ;">&lt;?php
/* Usar as funções do WordPress dentro de um arquivo fora do tema */
define('WP_USE_THEMES', false);
require('../../../wp-blog-header.php');
?&gt;</pre>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fusar-as-funcoes-do-wordpress-dentro-de-um-arquivo-que-esta-fora-do-tema%2F&amp;title=Usar%20as%20fun%C3%A7%C3%B5es%20do%20WordPress%20dentro%20de%20um%20arquivo%20que%20esta%20fora%20do%20tema" id="wpa2a_16">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/usar-as-funcoes-do-wordpress-dentro-de-um-arquivo-que-esta-fora-do-tema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comandos para sidebar de Blog no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/comandos-para-sidebar-de-blog-no-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/comandos-para-sidebar-de-blog-no-wordpress/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 20:29:49 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>
		<category><![CDATA[Sidebar blog]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=675</guid>
		<description><![CDATA[&#60;h3&#62;Arquivos&#60;/h3&#62; &#60;ul&#62; &#60;?php wp_get_archives('type=monthly'); ?&#62; &#60;/ul&#62; &#60;h3&#62;Categorias&#60;/h3&#62; &#60;ul&#62; &#60;?php wp_list_categories('title_li=&#38;show_count=1');?&#62; &#60;/ul&#62; &#60;h3&#62;Links&#60;/h3&#62; &#60;ul&#62; &#60;?php wp_list_bookmarks('title_li=&#38;categorize=0');?&#62; &#60;/ul&#62; &#60;h3&#62;Tags&#60;/h3&#62; &#60;p&#62;&#60;?php wp_tag_cloud();?&#62;&#60;/p&#62;]]></description>
			<content:encoded><![CDATA[<pre class="brush: php; title: ;">&lt;h3&gt;Arquivos&lt;/h3&gt;
&lt;ul&gt;
&lt;?php wp_get_archives('type=monthly'); ?&gt;
&lt;/ul&gt;

&lt;h3&gt;Categorias&lt;/h3&gt;
&lt;ul&gt;
&lt;?php wp_list_categories('title_li=&amp;show_count=1');?&gt;
&lt;/ul&gt;

&lt;h3&gt;Links&lt;/h3&gt;
&lt;ul&gt;
&lt;?php wp_list_bookmarks('title_li=&amp;categorize=0');?&gt;
&lt;/ul&gt;

&lt;h3&gt;Tags&lt;/h3&gt;
&lt;p&gt;&lt;?php wp_tag_cloud();?&gt;&lt;/p&gt;
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fcomandos-para-sidebar-de-blog-no-wordpress%2F&amp;title=Comandos%20para%20sidebar%20de%20Blog%20no%20WordPress" id="wpa2a_18">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/comandos-para-sidebar-de-blog-no-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Select com os estados brasileiros</title>
		<link>http://artesplasticas.art.br/wpedia/select-com-os-estados-brasileiros/</link>
		<comments>http://artesplasticas.art.br/wpedia/select-com-os-estados-brasileiros/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 13:35:57 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Úteis]]></category>
		<category><![CDATA[Select estados]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=669</guid>
		<description><![CDATA[Abaixo um código útil para listar todos os estados brasileiros e as rescpectivas siglas dentro de um select: &#60;select name=&#34;estado&#34;  style=&#34;width:500px;&#34; maxlength=&#34;150&#34; /&#62; &#60;option value=&#34;&#34;&#62;Selecione ...&#60;/option&#62; &#60;option value=&#34;AC&#34;&#62;Acre&#60;/option&#62; &#60;option value=&#34;AL&#34;&#62;Alagoas&#60;/option&#62; &#60;option value=&#34;AP&#34;&#62;Amapá&#60;/option&#62; &#60;option value=&#34;AM&#34;&#62;Amazonas&#60;/option&#62; &#60;option value=&#34;BA&#34;&#62;Bahia&#60;/option&#62; &#60;option value=&#34;CE&#34;&#62;Ceará&#60;/option&#62; &#60;option value=&#34;DF&#34;&#62;Distrito Federal&#60;/option&#62; &#60;option value=&#34;GO&#34;&#62;Goiás&#60;/option&#62; &#60;option value=&#34;ES&#34;&#62;Espírito Santo&#60;/option&#62; &#60;option value=&#34;MA&#34;&#62;Maranhão&#60;/option&#62; &#60;option value=&#34;MT&#34;&#62;Mato Grosso&#60;/option&#62; &#60;option value=&#34;MS&#34;&#62;Mato Grosso do [...]]]></description>
			<content:encoded><![CDATA[<p>Abaixo um código útil para listar todos os estados brasileiros e as rescpectivas siglas dentro de um select:</p>
<pre class="brush: php; title: ;">&lt;select name=&quot;estado&quot;  style=&quot;width:500px;&quot; maxlength=&quot;150&quot; /&gt;
&lt;option value=&quot;&quot;&gt;Selecione ...&lt;/option&gt;
 &lt;option value=&quot;AC&quot;&gt;Acre&lt;/option&gt;
 &lt;option value=&quot;AL&quot;&gt;Alagoas&lt;/option&gt;
 &lt;option value=&quot;AP&quot;&gt;Amapá&lt;/option&gt;
 &lt;option value=&quot;AM&quot;&gt;Amazonas&lt;/option&gt;
 &lt;option value=&quot;BA&quot;&gt;Bahia&lt;/option&gt;
 &lt;option value=&quot;CE&quot;&gt;Ceará&lt;/option&gt;
 &lt;option value=&quot;DF&quot;&gt;Distrito Federal&lt;/option&gt;
 &lt;option value=&quot;GO&quot;&gt;Goiás&lt;/option&gt;
 &lt;option value=&quot;ES&quot;&gt;Espírito Santo&lt;/option&gt;
 &lt;option value=&quot;MA&quot;&gt;Maranhão&lt;/option&gt;
 &lt;option value=&quot;MT&quot;&gt;Mato Grosso&lt;/option&gt;
 &lt;option value=&quot;MS&quot;&gt;Mato Grosso do Sul&lt;/option&gt;
 &lt;option value=&quot;MG&quot;&gt;Minas Gerais&lt;/option&gt;
 &lt;option value=&quot;PA&quot;&gt;Pará&lt;/option&gt;
 &lt;option value=&quot;PB&quot;&gt;Paraiba&lt;/option&gt;
 &lt;option value=&quot;PR&quot;&gt;Paraná&lt;/option&gt;
 &lt;option value=&quot;PE&quot;&gt;Pernambuco&lt;/option&gt;
 &lt;option value=&quot;PI&quot;&gt;Piauí­&lt;/option&gt;
 &lt;option value=&quot;RJ&quot;&gt;Rio de Janeiro&lt;/option&gt;
 &lt;option value=&quot;RN&quot;&gt;Rio Grande do Norte&lt;/option&gt;
 &lt;option value=&quot;RS&quot;&gt;Rio Grande do Sul&lt;/option&gt;
 &lt;option value=&quot;RO&quot;&gt;Rondônia&lt;/option&gt;
 &lt;option value=&quot;RR&quot;&gt;Roraima&lt;/option&gt;
 &lt;option value=&quot;SP&quot;&gt;São Paulo&lt;/option&gt;
 &lt;option value=&quot;SC&quot;&gt;Santa Catarina&lt;/option&gt;
 &lt;option value=&quot;SE&quot;&gt;Sergipe&lt;/option&gt;
 &lt;option value=&quot;TO&quot;&gt;Tocantins&lt;/option&gt;
 &lt;/select&gt;
</pre>
<p>Abaixo um código em PHP que pega o nome do estado brasileiro através da sigla:</p>
<pre class="brush: php; title: ;">// Pega o nome do estado através da sigla
 switch ($sigla_estado) {

case &quot;AC&quot;:
 $nome_stado = &quot;Acre&quot;;
 break;

 case &quot;AL&quot;:
 $nome_stado = &quot;Alagoas&quot;;
 break;

 case &quot;AP&quot;:
 $nome_stado = &quot;Amapá&quot;;
 break;

 case &quot;AM&quot;:
 $nome_stado = &quot;Amazonas&quot;;
 break;

 case &quot;BA&quot;:
 $nome_stado = &quot;Bahia&quot;;
 break;

 case &quot;CE&quot;:
 $nome_stado = &quot;Ceará&quot;;
 break;

 case &quot;DF&quot;:
 $nome_stado = &quot;Distrito Federal&quot;;
 break;

 case &quot;GO&quot;:
 $nome_stado = &quot;Goiás&quot;;
 break;

 case &quot;RO&quot;:
 $nome_stado = &quot;Rondônia&quot;;
 break;

 case &quot;ES&quot;:
 $nome_stado = &quot;Espírito Santo&quot;;
 break;

 case &quot;MA&quot;:
 $nome_stado = &quot;Maranhão&quot;;
 break;

 case &quot;MT&quot;:
 $nome_stado = &quot;Mato Grosso&quot;;
 break;

 case &quot;MS&quot;:
 $nome_stado = &quot;Mato Grosso do Sul&quot;;
 break;

 case &quot;MG&quot;:
 $nome_stado = &quot;Minas Gerais&quot;;
 break;

 case &quot;PA&quot;:
 $nome_stado = &quot;Pará&quot;;
 break;

 case &quot;PB&quot;:
 $nome_stado = &quot;Paraiba&quot;;
 break;

 case &quot;PR&quot;:
 $nome_stado = &quot;Paraná&quot;;
 break;

 case &quot;PE&quot;:
 $nome_stado = &quot;Pernambuco&quot;;
 break;

 case &quot;PI&quot;:
 $nome_stado = &quot;Piauí&quot;;
 break;

 case &quot;RJ&quot;:
 $nome_stado = &quot;Rio de Janeiro&quot;;
 break;

 case &quot;RN&quot;:
 $nome_stado = &quot;Rio Grande do Norte&quot;;
 break;

 case &quot;RS&quot;:
 $nome_stado = &quot;Rio Grande do Sul&quot;;
 break;

 case &quot;RO&quot;:
 $nome_stado = &quot;Rondônia&quot;;
 break;

 case &quot;RR&quot;:
 $nome_stado = &quot;Roraima&quot;;
 break;

 case &quot;SP&quot;:
 $nome_stado = &quot;São Paulo&quot;;
 break;

 case &quot;SC&quot;:
 $nome_stado = &quot;Santa Catarina&quot;;
 break;

 case &quot;SE&quot;:
 $nome_stado = &quot;Sergipe&quot;;
 break;

 case &quot;TO&quot;:
 $nome_stado = &quot;Tocantins&quot;;
 break;
 }
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fselect-com-os-estados-brasileiros%2F&amp;title=Select%20com%20os%20estados%20brasileiros" id="wpa2a_20">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/select-com-os-estados-brasileiros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Criando layout com CSS para formulario do Contact Form no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/criando-layout-com-css-contact-form-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/criando-layout-com-css-contact-form-wordpress/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 14:01:56 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Contac form 7]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=665</guid>
		<description><![CDATA[Coloque o código abaixo no campo formulário do plug-in Contact Form do WordPress: &#60;div class=&#34;area_inicio_formulario&#34;&#62;&#60;/div&#62; &#60;div class=&#34;area_linha&#34;&#62;&#60;/div&#62; &#60;div class=&#34;area_titulo&#34;&#62;Seu nome (obrigatório)&#60;/div&#62; &#60;div class=&#34;area_campo&#34;&#62;[text* your-name class:campo_nome]&#60;/div&#62; &#60;div class=&#34;area_linha&#34;&#62;&#60;/div&#62; &#60;div class=&#34;area_titulo&#34;&#62;Seu e-mail (obrigatório)&#60;/div&#62; &#60;div class=&#34;area_campo&#34;&#62;[email* your-email class:campo_nome]&#60;/div&#62; &#60;div class=&#34;area_linha&#34;&#62;&#60;/div&#62; &#60;div class=&#34;area_titulo&#34;&#62;Assunto&#60;/div&#62; &#60;div class=&#34;area_campo&#34;&#62;[text your-subject class:campo_nome]&#60;/div&#62; &#60;div class=&#34;area_linha&#34;&#62;&#60;/div&#62; &#60;div class=&#34;area_titulo&#34;&#62;Sua mensagem&#60;/div&#62; &#60;div class=&#34;area_campo_texto&#34;&#62;[textarea your-message class:campo_texto] &#60;/div&#62; &#60;div class=&#34;area_linha&#34;&#62;&#60;/div&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Coloque o código abaixo no campo formulário do plug-in Contact Form do WordPress:</p>
<pre class="brush: php; title: ;">
&lt;div class=&quot;area_inicio_formulario&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;area_linha&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;area_titulo&quot;&gt;Seu nome (obrigatório)&lt;/div&gt;
&lt;div class=&quot;area_campo&quot;&gt;[text* your-name class:campo_nome]&lt;/div&gt;

&lt;div class=&quot;area_linha&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;area_titulo&quot;&gt;Seu e-mail (obrigatório)&lt;/div&gt;
&lt;div class=&quot;area_campo&quot;&gt;[email* your-email class:campo_nome]&lt;/div&gt;

&lt;div class=&quot;area_linha&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;area_titulo&quot;&gt;Assunto&lt;/div&gt;
&lt;div class=&quot;area_campo&quot;&gt;[text your-subject class:campo_nome]&lt;/div&gt;

&lt;div class=&quot;area_linha&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;area_titulo&quot;&gt;Sua mensagem&lt;/div&gt;
&lt;div class=&quot;area_campo_texto&quot;&gt;[textarea your-message class:campo_texto] &lt;/div&gt;

&lt;div class=&quot;area_linha&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;area_titulo&quot;&gt; &lt;/div&gt;
&lt;div class=&quot;area_campo&quot;&gt;[submit class:campo_enviar &quot;Enviar&quot;]&lt;/div&gt;

&lt;div class=&quot;area_linha&quot;&gt;&lt;/div&gt;
</pre>
<p>No arquivo CSS do seu tema cololoque os códigos abaixo:</p>
<pre class="brush: php; title: ;">
/*FORMULARIOS*/
.area_inicio_formulario{
    display: inline;
    float: left;
	height: 20px;
	widows: 100%;
	clear: both;
}
.area_titulo{
    display: inline;
    float: left;
    font-size: 12px;
    height: 40px;
    margin-left: 20px;
    margin-right: 10px;
    text-align: right;
    width: 170px;
}
.area_campo{
	float: left;
	display: inline;
	width: 190px;
	height: 40px;
}
.area_campo_texto{
	float: left;
	display: inline;
	width: 190px;
	height: auto;
}
.area_linha{
	clear: both;
	width: 100%;
	height:1px;
}
.campo_nome {
    background: none repeat scroll 0 0 #F4F4F4;
    border: 1px solid #E6E6E6;
    font-size: 12px;
    height: 20px;
    padding: 2px 2px 2px 6px;
    width: 250px;
}
.campo_nome:focus {
	border:1px solid #999;
	background:#fff;
}
.campo_texto {
	border: #e6e6e6 1px solid;
	font-size: 12px;
	padding: 2px 2px 2px 6px;
	background: #F4F4F4;
	width:250px;
	height: 138px;
}
.campo_enviar {
	border: #e6e6e6 1px solid;
	font-size: 12px;
	font-weight:600;
	padding: 2px;
	 background-color: #787878;
	width:65px;
	margin-left: 196px;
	color: #FFFFFF;
}
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fcriando-layout-com-css-contact-form-wordpress%2F&amp;title=Criando%20layout%20com%20CSS%20para%20formulario%20do%20Contact%20Form%20no%20WordPress" id="wpa2a_22">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/criando-layout-com-css-contact-form-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch o select case do PHP</title>
		<link>http://artesplasticas.art.br/wpedia/switch-o-select-case-do-php/</link>
		<comments>http://artesplasticas.art.br/wpedia/switch-o-select-case-do-php/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 19:40:49 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Select Case]]></category>
		<category><![CDATA[Switch]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=660</guid>
		<description><![CDATA[Sintaxe do switch na linguagem PHP: &#60;?php switch ($i) { case &#34;apple&#34;: echo &#34;i is apple&#34;; break; case &#34;bar&#34;: echo &#34;i is bar&#34;; break; case &#34;cake&#34;: echo &#34;i is cake&#34;; break; } ?&#62; &#160; Referência: http://php.net/manual/pt_BR/control-structures.switch.php]]></description>
			<content:encoded><![CDATA[<div>
<div>Sintaxe do switch na linguagem PHP:</div>
<div><code> </code>
<pre class="brush: php; title: ;">&lt;?php
switch ($i) {
 case &quot;apple&quot;:
 echo &quot;i is apple&quot;;
 break;
 case &quot;bar&quot;:
 echo &quot;i is bar&quot;;
 break;
 case &quot;cake&quot;:
 echo &quot;i is cake&quot;;
 break;
}
?&gt;</pre>
<p>&nbsp;</p>
</div>
</div>
<p>Referência: <a href="http://php.net/manual/pt_BR/control-structures.switch.php" target="_blank">http://php.net/manual/pt_BR/control-structures.switch.php</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fswitch-o-select-case-do-php%2F&amp;title=Switch%20o%20select%20case%20do%20PHP" id="wpa2a_24">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/switch-o-select-case-do-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript função para digitar somente números em um campo texto</title>
		<link>http://artesplasticas.art.br/wpedia/javascript-digitar-somente-numeros-em-um-campo-texto/</link>
		<comments>http://artesplasticas.art.br/wpedia/javascript-digitar-somente-numeros-em-um-campo-texto/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 17:24:01 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Java Script]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=656</guid>
		<description><![CDATA[Abaixo um código em Javascript que permite digitar somente números no campo texto. &#60;script language='JavaScript'&#62; function SomenteNumero(e){ var tecla=(window.event)?event.keyCode:e.which; if((tecla&#62;47 &#38;&#38; tecla&#60;58)) return true; else{ if (tecla==8 &#124;&#124; tecla==0) return true; else  return false; } } &#60;/script&#62; Para chamar a função coloque dentro do campo input text o evento onkeypress, veja o modelo abaixo: &#60;input [...]]]></description>
			<content:encoded><![CDATA[<p>Abaixo um código em Javascript que permite digitar somente números no campo texto.</p>
<pre class="brush: php; title: ;">&lt;script language='JavaScript'&gt;
function SomenteNumero(e){
 var tecla=(window.event)?event.keyCode:e.which;
 if((tecla&gt;47 &amp;&amp; tecla&lt;58)) return true;
 else{
 if (tecla==8 || tecla==0) return true;
 else  return false;
 }
}
&lt;/script&gt;</pre>
<p>Para chamar a função coloque dentro do campo input text o evento onkeypress, veja o modelo abaixo:</p>
<pre class="brush: php; title: ;">&lt;input type=&quot;text&quot; size=&quot;10&quot; value=&quot;&quot;' onkeypress=&quot;return SomenteNumero(event);&quot;&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Fjavascript-digitar-somente-numeros-em-um-campo-texto%2F&amp;title=Javascript%20fun%C3%A7%C3%A3o%20para%20digitar%20somente%20n%C3%BAmeros%20em%20um%20campo%20texto" id="wpa2a_26">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/javascript-digitar-somente-numeros-em-um-campo-texto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Estrutura do banco de dados WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/estrutura-do-banco-de-dados-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/estrutura-do-banco-de-dados-wordpress/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 17:07:55 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Úteis]]></category>
		<category><![CDATA[Banco de dados Wordpress]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=652</guid>
		<description><![CDATA[Clique na imagem para ampliar]]></description>
			<content:encoded><![CDATA[<p><a href="http://artesplasticas.art.br/wpedia/wp-content/uploads/2011/08/estrutura-de-dados-wordpress.png"><img class="alignnone size-medium wp-image-653" title="Modelo da estrutura do banco de dados WordPress" src="http://artesplasticas.art.br/wpedia/wp-content/uploads/2011/08/estrutura-de-dados-wordpress-300x258.png" alt="" width="300" height="258" /></a></p>
<p>Clique na imagem para ampliar</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Festrutura-do-banco-de-dados-wordpress%2F&amp;title=Estrutura%20do%20banco%20de%20dados%20WordPress" id="wpa2a_28">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/estrutura-do-banco-de-dados-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listar o primeiro nível de páginas filhas de uma página no WordPress</title>
		<link>http://artesplasticas.art.br/wpedia/listar-o-primeiro-nivel-de-paginas-filhas-de-uma-pagina-no-wordpress/</link>
		<comments>http://artesplasticas.art.br/wpedia/listar-o-primeiro-nivel-de-paginas-filhas-de-uma-pagina-no-wordpress/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 14:58:14 +0000</pubDate>
		<dc:creator>Henderson</dc:creator>
				<category><![CDATA[Páginas]]></category>
		<category><![CDATA[wp_list_pages()]]></category>

		<guid isPermaLink="false">http://artesplasticas.art.br/wpedia/?p=646</guid>
		<description><![CDATA[O código abaixo cria uma lista de links para páginas filhas da página de id = 10, determinado no parâmetro child_of=10. &#60;ul&#62; &#60;?php $lista_subpaginas=wp_list_pages(&#8216;depth=1&#38;title_li=&#38;child_of=10&#38;echo=0&#8242;); echo $lista_subpaginas; ?&#62; &#60;/ul&#62; O parâmetro depth=1 faz o WordPress exibir somente o primeiro nível de páginas filhas. Se quiser exibir as páginas filhas das filhas (netas) coloque depth=0.]]></description>
			<content:encoded><![CDATA[<p>O código abaixo cria uma lista de links para páginas filhas da página de id = 10, determinado no parâmetro child_of=10.</p>
<p>&lt;ul&gt;<br />
&lt;?php<br />
$lista_subpaginas=wp_list_pages(&#8216;depth=1&amp;title_li=&amp;child_of=10&amp;echo=0&#8242;);<br />
echo $lista_subpaginas;<br />
?&gt;<br />
&lt;/ul&gt;</p>
<p>O parâmetro depth=1 faz o WordPress exibir somente o primeiro nível de páginas filhas. Se quiser exibir as páginas filhas das filhas (netas) coloque depth=0.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fartesplasticas.art.br%2Fwpedia%2Flistar-o-primeiro-nivel-de-paginas-filhas-de-uma-pagina-no-wordpress%2F&amp;title=Listar%20o%20primeiro%20n%C3%ADvel%20de%20p%C3%A1ginas%20filhas%20de%20uma%20p%C3%A1gina%20no%20WordPress" id="wpa2a_30">Compartilhar/Favoritos</a></p>]]></content:encoded>
			<wfw:commentRss>http://artesplasticas.art.br/wpedia/listar-o-primeiro-nivel-de-paginas-filhas-de-uma-pagina-no-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

