Parse error: syntax error, unexpected ‘}’ in

In that last block, there’s a mix of bracketed and bracket-free if statements that make it hard to debug. I’d suggest rewriting it like this and using indentation to make it easier to see what is going on at a glance: if (is_page(esc_url( wp_get_current_url() . ‘/?sortby=asc’))) { if ( $newQuery->have_posts() ) { while ( $newQuery->have_posts() … Read more

How can I get is_page(Current_URL)?

The documentation on is_page(), when you scroll down, has some great examples of how to use it: // When any single Page is being displayed. is_page(); // When Page 42 (ID) is being displayed. is_page( 42 ); // When the Page with a post_title of “Contact” is being displayed. is_page( ‘Contact’ ); // When the … Read more