PDA

View Full Version : what is the meaning of xx and yy ?


mampwamp
08-15-2010, 05:50 PM
$myposts->query( numberposts=xx&paged=yy )


what is the meaning of xx and yy ?
can anyone explain the php code above ?

davidj
08-15-2010, 08:36 PM
it is a method call from an object

it looks like it is passing in an argument which looks to be possibly part of a query string maybe. I dont really know without seeing the query method

If it is an argument being passed then its wrong as it should be a string

mampwamp
08-16-2010, 12:13 AM
it is a method call from an object

it looks like it is passing in an argument which looks to be possibly part of a query string maybe. I dont really know without seeing the query method

If it is an argument being passed then its wrong as it should be a string


$baseurl = get_bloginfo('url');
$myposts = new WP_Query();
$myposts->query( numberposts=xx&paged=yy );
while ($myposts->hav_posts()) {
$post = $myposts->the_post();
pagination( $myposts, $baseurl);
}


thank for your answer, can help me check that is that the php code above have any wrong statement ?

davidj
08-16-2010, 09:42 AM
I think you have copied the code and the code has included hints as to what it expects for arguments and parameters.


$baseurl = get_bloginfo('url'); /// << here it is expecting a URL. I think you have to replace 'url' with a valid one

$myposts->query( numberposts=xx&paged=yy ); /// << here I think you need to replace numberposts=xx&paged=yy with some numerical values. Maybe 20,5

I am just guessing as I don't know the script

mampwamp
08-17-2010, 03:42 AM
thank davidj, it work.

mampwamp
08-17-2010, 03:57 AM
thank........

davidj
08-17-2010, 09:23 AM
thank davidj, it work.

Im on fire!!