@php $isHome = is_front_page(); @endphp @if ($isHome)

@else

@else @endif {!! get_search_form(false) !!} @php global $post; $url_download = get_field('file', $post->ID)['url']; $final_name = get_field('file', $post->ID)['name']; $impact = false; $zineAccess = false; // impact report 2022 $page_url = get_permalink(get_page_by_path('page-test')); if(strpos($_SERVER['REQUEST_URI'], "impactreport-2021")) { $impact = true; } if(strpos($_SERVER['REQUEST_URI'], "zine-22for22")) { $zineAccess = true; } @endphp @if ($impact)
DOWNLOAD REPORT
@endif @if ($zineAccess) @endif @if (strpos($_SERVER['REQUEST_URI'], "impactreport-2022") && !is_404()) @php $reportHome = get_page_by_path('impactreport-2022'); $reportHomeUrl = get_permalink($reportHome); // do_action('enable_wpml_auto_id'); $id = apply_filters( 'wpml_object_id', $reportHome->ID, 'page', TRUE ); $childrenArgs = array( 'post_parent' => $id, 'post_type' => 'page', 'orderby' => 'title', 'order' => 'ASC', 'numberposts' => -1, ); $children = get_children($childrenArgs); $peopleID = 0; $planetID = 0; foreach ($children as $child) { if ($peopleID == 0) { $peopleID = $child->ID; } else if ($planetID == 0) { $planetID = $child->ID; break; } } $peopleUrl = get_permalink($peopleID); $planetUrl = get_permalink($planetID); // error_log(json_encode($id)); // error_log(json_encode($post->ID)); // error_log(json_encode($peopleID)); // error_log(json_encode($post->post_parent)); // error_log(json_encode($post)); @endphp
@endif