1 2 3 4 5 6 7 8 | if (! empty ( $_GET [ 'slug' ])) { $current = parse_url ( $_SERVER [ 'REQUEST_URI' ], PHP_URL_PATH); $page = get_page_by_path( $current ); echo "<a href='" .site_url(). "/wp-admin/post.php?post=" . $page ->ID. "&action=edit'>Page</a>" ; exit ; } |