admin管理员组文章数量:1313599
So, I created a link in the frontend which allows the user to preview their post. However, when I click on it, it takes me to the published post instead of previewing the changes I made.
Here is what I wrote:
<a href="<?php echo get_preview_post_link($post->ID) ?>" target="wp-preview-<?php echo $post->ID ?>" id="post-preview"> Preview </a>
If I go into wp-admin and preview the post, it works fine.
本文标签: custom post typesPreview url not working outside wpadmin
版权声明:本文标题:custom post types - Preview url not working outside wp-admin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741925265a2405245.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论