How do I get the current path and add a condition in page.html.twig?
Try this 

{% if 'location/all' in url('&lt;current&gt;')|render|render %}


Alternative solution would be to add the following to your THEMENAME.theme 

function THEMENAME_preprocess_page(&amp;$vars) {
  $vars['path'] = \Drupal::service('path.current')-&gt;getPath();
}


and use this in your page.html.twig

{% if 'location/all' in path %}