[wp-hackers] get_posts problem...
Dan Larkin
nitephire at gmail.com
Wed Mar 5 01:29:50 GMT 2008
For the "the_title()" calls in the list, you need to add a semi-colon, to
make it "the_title();". I think that should fix it.
:: Dan Larkin
On 3/4/08, spencerp <theone.andonly.mr.awesome at gmail.com> wrote:
>
> Jeremy Visser wrote:
> > I later realised that won't work, because it's still using
> > the_permalink() and the_title() later on.
> >
> > We need to do some query_posts() mojo.
> >
>
>
> LOL!
>
>
> > Like maybe
> >
> > <?php
> >
> > global $wp_query, $wp_old_query;
> > $wp_old_query = $wp_query;
> >
> > query_posts('numberposts=10&offset=0');
> >
> > while ( have_posts() ) :
> > the_post();
> >
> > ?>
> > <li>
> > <ul>
> > <li><a href="<?php the_permalink(); ?>" title="<?php
> the_title() ?>"><?php the_title() ?></a></li>
> > </ul>
> > </li>
> > <?php
> >
> > endwhile;
> > $wp_query = $wp_old_query;
> >
> > ?>
>
>
> Just tried that, and gives me following error:
>
> Parse error: syntax error, unexpected '?' in C:\Program
> Files\xampp\htdocs\wp-content\themes\TheVindictiveBastardTheme1\header.php
> on line 55
>
> I'm not a coder professional so... not sure about all this hacking code
> stuff LOL!
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list