[theme-reviewers] Quick Question

Otto otto at ottodestruct.com
Sun Dec 23 21:42:48 UTC 2012

On Sun, Dec 23, 2012 at 1:51 PM, Bryan Hadaway <bhadaway at gmail.com> wrote:
> I'm using:
> <?php elseif ( isset($_GET['paged']) && !empty($_GET['paged']) ) : ?>
> Am I required to use this:
> http://codex.wordpress.org/Function_Reference/get_query_var instead or is
> this merely a recommendation?

The get_query_var() is preferred because it's going to get you the
actual value being used and not just what was in the URL. Other
things, such as plugins, can alter the query vars before the query is
run, you see.

Generally you want to know the real values being used and not just the
requested ones from $_GET.


More information about the theme-reviewers mailing list