Support » Fixing WordPress » PHP syntax question

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m going to take a W.A.G. at this one, so don’t laugh at me. Okay, you can laugh if you want to. I will state it in the form of a question for anyone who knows the correct answer… (’cause I don’t really know either). 😛

    Doesn’t “->” simply indicate that “post_count” is to be the object property or variable shown by $wp_query? Am I even close, or is there more to it than that?

    Hi, that’s pretty much it, the arrow there is referencing a method or property of a defined php class, in this case the $wp_query object. In this usage it’s a bit like getting the value of an array. Read more about $wp_query properties here.

    More reading classes in the php manual here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP syntax question’ is closed to new replies.