Re: newbie question - php parsing
| From: | Jo�o C�ndido de Souza Neto | Date: | Wed, 22 Jul 2009 21:01:33 +0000 |
| Subject: | Re: newbie question - php parsing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295714@lists.php.net to get a copy of this message | ||
You made a mistake in your code:
<?php the_title(); ?>
must be:
<?php echo the_title(); ?>
--
João Cândido de Souza Neto
SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS
Fone: (0XX41) 3033-3636 - JS
www.siens.com.br
"Sebastiano Pomata" <lafayette84@gmail.com> escreveu na mensagem
news:70fe20d60907221355m3fa49a75ua053d2f1b9aca055@mail.gmail.com...
> Hi all,
>
> A little doubt caught me while I was writing this snippet of code for
> a wordpress template:
>
> <?php if (the_title('','',FALSE) != 'Home') { ?>
> <h2 class="entry-header"><?php the_title(); ?></h2>
> <?php } ?>
>
> I always thought that php was called only between the <?php ?> tags,
> and I'm pretty sure that's right, while HTML code was simply wrote in
> document as is, without further logic.
> Now, I can't figure out how this snippet works: I mean, shouldn't HTML
> code be simply put on document, as it is outside php invoke?
> Effectively if the title of page is 'Home', the HTML part is totally
> skipped.
>
> Is the if construct that does all the magic inside?