Orkut Gmail Agenda Docs Web mais »
Grupos visitados recentemente | Ajuda | Acessar
Página inicial dos Grupos do Google
Mensagem sobre o tópico Mostrar a imagem de um post no template

Visualizar analisado - Mostrar apenas o texto da mensagem ??

Received: by 10.211.194.9 with SMTP id w9mr277141ebp.14.1243895141243;
        Mon, 01 Jun 2009 15:25:41 -0700 (PDT)
Return-Path: <caio.mancini.lis...@gmail.com>
Received: from mail-ew0-f180.google.com (mail-ew0-f180.google.com [209.85.219.180])
        by gmr-mx.google.com with ESMTP id 15si885790ewy.0.2009.06.01.15.25.40;
        Mon, 01 Jun 2009 15:25:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of caio.mancini.lis...@gmail.com designates 209.85.219.180 as permitted sender) client-ip=209.85.219.180;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of caio.mancini.lis...@gmail.com designates 209.85.219.180 as permitted sender) smtp.mail=caio.mancini.lis...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-ew0-f180.google.com with SMTP id 28so9422390ewy.4
        for <wordpress-brasil@googlegroups.com>; Mon, 01 Jun 2009 15:25:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:date:message-id:subject
         :from:to:content-type;
        bh=LKnB4KXFpjRPFOZzLLCKKMYS/FlkZa2SD36/4DmOA4A=;
        b=ubyRtG7XP1YWarwZYtp/7dM/HDqsAn1Vdl9+CPJ1woP1cXuIkSDTjjX1W2yJDhfjb+
         9Uz6kj0i4QTQLsHTFTbzbcB8bkptJjWm7Ez7ZUwqCfasdM6rQN6Y1dqmWJWS6jo+RI1z
         isWVKk2l1zMVbSl7NVdvvvHKyYrWca/IjKM/w=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:date:message-id:subject:from:to:content-type;
        b=PiUwwLzKcDrUYBsMymqz5Ca4vTwARqltzEoV+oq6GZBGIbsmJF3E8zazco/aSPigBj
         r3SYHyZDxovkgy8PgPPqvFAKQihgMyz8DIoOWHk28jRNIVkg6bghKT7sicFMCFfTZSGs
         FiVTdGdvsyAyOnSQUQ//RavmTJYK0/nWsYIRo=
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="0016e6d7eea6d70697046b50e796"
Received: by 10.216.74.71 with SMTP id w49mr1995209wed.135.1243895138026; Mon, 
	01 Jun 2009 15:25:38 -0700 (PDT)
Date: Mon, 1 Jun 2009 19:25:38 -0300
Message-ID: <f311d87e0906011525o11e11873r3efb14d64b0f20b9@mail.gmail.com>
Subject: Mostrar a imagem de um post no template
From: Caio Mancini <caio.mancini.lis...@gmail.com>
To: wordpress-brasil@googlegroups.com

--0016e6d7eea6d70697046b50e796
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Ol=E1 a todos!

Estou criando um template para meu site, e na minha inicial trarei um resum=
o
dos principais posts. Mas um em espec=EDfico mostrarei em destaque com sua
imagem e o t=EDtulo.
Estou com dificuldades para mostrar a imagem que inseri no post.

J=E1 usei o plugin getImage, mas n=E3o funcionou, e tentei de v=E1rias form=
as usar
a tag wp_get_attachment_image e nada.
Usei algo do tipo:

<?php echo wp_get_attachment_image($post->ID,'medium'); ?>

Mas n=E3o deu certo tamb=E9m.

O meu c=F3digo no template est=E1 mais ou menos isso:

<?php
            query_posts('showposts=3D1&tag=3Ddestaque');

            if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

                <h2 id=3D"manchete_destaque"><a href=3D"<?php the_permalink=
()
?>" rel=3D"bookmark"><?php the_title(); ?></a></h2>

                <div id=3D"div_destaque">
                    <a href=3D=94<?php echo wp_get_attachment_url($post->ID=
);
?>=94>
                        <?php echo
wp_get_attachment_image($post->ID,'medium'); ?>
                    </a>
                    <span id=3D"leg_destaque"><?php the_excerpt(); ?></span=
>
                </div>

            <?php endwhile; else: ?>
                <div id=3D"div_destaque">
                    <h4 id=3D"publi">Ops... nada publicado</h4>
                </div>
            <?php
                endif;
                wp_reset_query();
            ?>

Desde j=E1 agrade=E7o muito a ajuda, sou iniciante no neg=F3cio de criar os
pr=F3prios templates.

Grato.



--=20
Caio M. S. Mancini
MSN: kaiou200...@yahoo.com.br
ICQ: 177165688
AIM: caiomalkavianos
Skype: caiomalkavianos
http://caiomancini.blogspot.com
http://avalanche.87fm.com.br
http://bambolequadrado.blogspot.com

--0016e6d7eea6d70697046b50e796
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Ol=E1 a todos!<br><br>Estou criando um template para meu site, e na minha
inicial trarei um resumo dos principais posts. Mas um em espec=EDfico
mostrarei em destaque com sua imagem e o t=EDtulo.<br>Estou com dificuldade=
s para mostrar a imagem que inseri no post.<br>
<br>J=E1 usei o plugin getImage, mas n=E3o funcionou, e tentei de v=E1rias =
formas usar a tag wp_get_attachment_image<span style=3D"color: rgb(0, 153, =
0);"></span>
 e nada.<br>Usei algo do tipo:<br><br style=3D"font-family: courier new,mon=
ospace; color: rgb(0, 0, 0);"><font style=3D"font-family: courier new,monos=
pace; color: rgb(0, 0, 0);" size=3D"2">&lt;?php echo wp_get_attachment_imag=
e($post-&gt;ID,&#39;medium&#39;); ?&gt;</font><br>

<br>Mas n=E3o deu certo tamb=E9m.<br><br>O meu c=F3digo no template est=E1 =
mais ou menos isso:<br><br><span style=3D"font-family: courier new,monospac=
e;">&lt;?php</span><br style=3D"font-family: courier new,monospace;"><span =
style=3D"font-family: courier new,monospace;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0=
 query_posts(&#39;showposts=3D1&amp;tag=3Ddestaque&#39;);</span><br style=
=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0 =A0=A0=A0 =A0=
=A0=A0 </span><br style=3D"font-family: courier new,monospace;"><span style=
=3D"font-family: courier new,monospace;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 if (=
 have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;</span><br styl=
e=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0 =A0=A0=A0 </s=
pan><br style=3D"font-family: courier new,monospace;"><span style=3D"font-f=
amily: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 &lt;h2 id=3D&quot;manchete_destaque&quot;&gt;&lt;a href=
=3D&quot;&lt;?php
the_permalink() ?&gt;&quot; rel=3D&quot;bookmark&quot;&gt;&lt;?php the_titl=
e();
?&gt;&lt;/a&gt;&lt;/h2&gt;</span><br style=3D"font-family: courier new,mono=
space;">
<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0 <=
/span><br style=3D"font-family: courier new,monospace;"><span style=3D"font=
-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 &lt;div id=3D&quot;div_destaque&quot;&gt;</span><br style=3D"font-famil=
y: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;a href=3D=94&lt;?php echo wp_get_a=
ttachment_url($post-&gt;ID); ?&gt;=94&gt;</span><br style=3D"font-family: c=
ourier new,monospace;"><span style=3D"font-family: courier new,monospace;">=
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 </span><font st=
yle=3D"font-family: courier new,monospace; color: rgb(0, 0, 0);" size=3D"2"=
>&lt;?php echo wp_get_attachment_image($post-&gt;ID,&#39;medium&#39;); ?&gt=
;</font><br style=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;/a&gt;</span><br style=3D"font-fam=
ily: courier new,monospace;"><span style=3D"font-family: courier new,monosp=
ace;">=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;span id=
=3D&quot;leg_destaque&quot;&gt;&lt;?php the_excerpt(); ?&gt;&lt;/span&gt;</=
span><br style=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 &lt;/div&gt;</span><br style=3D"font-family: couri=
er new,monospace;"><span style=3D"font-family: courier new,monospace;">=A0=
=A0=A0=A0=A0=A0=A0 </span><br style=3D"font-family: courier new,monospace;"=
>

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0 =
=A0=A0=A0 &lt;?php endwhile; else: ?&gt;</span><br style=3D"font-family: co=
urier new,monospace;"><span style=3D"font-family: courier new,monospace;">=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;div id=3D&quot;div_destaq=
ue&quot;&gt;</span><br style=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;h4 id=3D&quot;publi&quot;&gt;Ops..=
. nada publicado&lt;/h4&gt;</span><br style=3D"font-family: courier new,mon=
ospace;"><span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;/div&gt;</span><br style=3D"font-fami=
ly: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0 =A0=A0=A0 =A0=
=A0=A0 &lt;?php</span><br style=3D"font-family: courier new,monospace;"><sp=
an style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 endif;</span><br style=3D"font-family: courier new,mo=
nospace;">

<span style=3D"font-family: courier new,monospace;">=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 wp_reset_query();</span><br style=3D"font-family: =
courier new,monospace;"><span style=3D"font-family: courier new,monospace;"=
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ?&gt;</span><br style=3D"font-family: co=
urier new,monospace;">

<br>Desde j=E1 agrade=E7o muito a ajuda, sou iniciante no neg=F3cio de cria=
r os pr=F3prios templates.<br><br>Grato.<br><font color=3D"#888888"><br></f=
ont><br clear=3D"all"><br>-- <br>Caio M. S. Mancini<br>MSN: <a href=3D"mail=
to:kaiou200...@yahoo.com.br">kaiou200...@yahoo.com.br</a><br>
ICQ: 177165688<br>AIM: caiomalkavianos<br>Skype: caiomalkavianos<br><a href=
=3D"http://caiomancini.blogspot.com">http://caiomancini.blogspot.com</a><br=
><a href=3D"http://avalanche.87fm.com.br">http://avalanche.87fm.com.br</a><=
br>
<a href=3D"http://bambolequadrado.blogspot.com">http://bambolequadrado.blog=
spot.com</a><br>

--0016e6d7eea6d70697046b50e796--


Criar um grupo - Grupos do Google - Página inicial do Google - Termos de Uso - Política de Privacidade
©2009 Google