• I am little new to wpress
    What following does? =>
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;

    And What is the condition given using ternary operator ?? please help.

Viewing 1 replies (of 1 total)
  • The get_query_var() function will return the value of ‘paged’ from the query if it is set, otherwise it will return an empty string.

    If it returns a value, the condition is true and $paged will be set to that value by the second call.

    If it returns an empty string, the condition is false and $paged will be set to 1.

Viewing 1 replies (of 1 total)
  • The topic ‘Please explain working of following Pagination code’ is closed to new replies.