wordpress codigoArquivo de

Ajax Aplicações Banco de Dados Blog Blogs Celular CRM Curso Linux Ubuntu Online Código Fonte ERP Java Linux Noticias PHP Ruby on Rails Twitter videos Virtualização WordPress

WordPress – Como mostrar miniatura de post no seu Feed

Uma das coisas legais do WordPress é o recurso de gerar miniatura. As miniaturas de um post não estão incluídas por padrão, então eles não serão exibidos no seu blog a menos que você chame a função adequada.

wordpress comando sql para manutenção

Ler o resto do artigo »

Como remover o private / protected do títulos de um post no WordPress

Edite o seu arquivo functions.php do seu tema


function the_title_trim($title) {

  $title = attribute_escape($title);

  $findthese = array(
    '#Protected:#',
    '#Private:#'
  );

  $replacewith = array(
    '', // Vai substituirá o "Protected:"
    '' // Vai substituirá o "Private:" 
  );

  $title = preg_replace($findthese, $replacewith, $title);
  return $title;
}
add_filter('the_title', 'the_title_trim')

Como incluir qualquer arquivo no seu tema WordPress

Simples maneira de incluir um arquivo php no seu tema wordpress


<?php include (TEMPLATEPATH . '/menu-arquivo.php'); ?>

Como adicionar link para sites de Social Media no WordPress

Coloque este código no arquivo single.php do seu tema o wordpress. Dentro do loop

// bookmark on Delicious
<a rel="nofollow" href="http://delicious.com/post?url=<?php the_permalink(); ?>&amp;title=<?php echo urlencode(get_the_title($id)); ?>" title="Bookmark this post at Delicious">Bookmark at Delicious</a>

// submit to Digg
<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=<?php the_permalink(); ?>" title="Submit this post to Digg">Digg this!</a>

// tweet on Twitter
<a rel="nofollow" href="http://twitter.com/home?status=<?php echo urlencode("Currently reading: "); ?><?php the_permalink(); ?>" title="Share this article with your Twitter followers">Tweet this!</a>

// submit to StumbleUpon
<a rel="nofollow" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&amp;title=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post at StumbleUpon">Stumble this!</a>

// share on Facebook
<a rel="nofollow" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;t=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post on Facebook">Share on Facebook</a>

// submit to Blinklist
<a rel="nofollow" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;url=<?php the_permalink(); ?>&amp;Title=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post on Blinklist" >Blink This!</a>

// store on Furl
<a rel="nofollow" href="http://furl.net/storeIt.jsp?t=<?php echo urlencode(get_the_title($id)); ?>&amp;u=<?php the_permalink(); ?>" title="Share this post on Furl">Furl This!</a>

// submit to Reddit
<a rel="nofollow" href="http://reddit.com/submit?url=<?php the_permalink(); ?>&amp;title=<?php echo urlencode(get_the_title($id)); ?>" title="Share this post on Reddit">Share on Reddit</a>

Como criar um Tag Cloud no WordPress

Como criar um tag could no wordpress, de forma simples

<?php wp_tag_cloud( array(

    'smallest' => 8,          // tamanho da menor fonte a ser utilizada
    'largest'  => 22,         // tamanho da maior fonte a ser utilizada
    'unit'     => 'px',         // escolha como será o dimensionamento  (pt, em, px, etc)
    'number'   => 45,       // Número máximo de tags para mostrar
    'format'   => 'flat',      // flat, list, or array. flat = spaces between; list = in li tags; array = does not echo results, returns array
    'orderby'  => 'name',   // forma de ordenação name = alfanumerico por name; count = por popularidade
    'order'    => 'ASC',      // starting from A, or starting from highest count
    'exclude'  => 12,         // ID's de tags para excluir
    'include'  => 13,         // ID's of tags to include, displays none except these
    'link'     => 'view',     // view = links to tag view; edit = link to edit tag
    'taxonomy' => 'post_tag', // post_tag, link_category, category - create tag clouds of any of these things
    'echo'     => true        // set to false to return an array, not echo it

) ); ?>

Como remover a meta tag WordPress Generator

Pode ser arriscado na questão segurança mostrar a versão do seu wordpress, claro que podemos escondê-lo.

Inclua a linha abaixo no seu arquivo functions.php do seu tema.

remove_action('wp_head', 'wp_generator');

Page 1 of 212