So I am wanting to show the wp-admin/post.php?post=999&action=edit
Inside my custom template of the single.php
and page.php
.
So I understand that I can do it using an iFrame by basically get_the_ID() of the current page and passing the URL of wp-admin/post.php?post=999&action=edit
in the src
of the iframe...
for example:
<iframe seamless="seamless" scrolling="yes" src="<?= get_bloginfo(url); ?>/wp-admin/post.php?post=<?= get_the_ID(); ?>&action=edit" allowfullscreen="" frameborder="0"></iframe>
However, I do not want to completely access the wp-admin from an iframe, causing a cycle of a "looking into mirror-to-mirror effect" with iframes-to-iframes.
I've also thought that if I used an Iframe, then I would have to write a jquery script to capture all <a>
and turn them into an onclick function to send the link to the:
window.top.location.href = url;
.
If there is a better way to access the edit page screen from the template, please let me know...
My goal is to make the wordpress admin completely show on frontend of site