最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to show WP admin edit page within template pagepost?

programmeradmin1浏览0评论

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(); ?>&amp;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

发布评论

评论列表(0)

  1. 暂无评论