[ad_1]
Thread Starter
hupe13
(@hupe13)
Solved with
function detect_fake_shortlink($return, $id, $context, $allow_slugs) {
$url = isset($_SERVER["SCRIPT_URL"]) ? $_SERVER['SCRIPT_URL'] : "";
if (strpos($url, "/fakeslug/") !== false ) {
return true;
}
return $return;
}
// add the filter
add_filter( "pre_get_shortlink", "detect_fake_shortlink", 10, 4 );But now and even before is still the error:PHP Warning: Attempt to read property "post_parent" on null in /wp-includes/post-template.php on line 724
Thread Starter
hupe13
(@hupe13)
Set
$wp_query->is_page = false;
$wp_query->is_singular = false;
