Paul Ryan on "[Plugin: Insert Pages] Creating private pages to be inserted in others"

ساخت وبلاگ

Hi,
I think this plugin is great but I haven't been able to do the following:
I have some pages with content that has no meaning if taken alone. I use them only in the insertpage tag and therefore I don't want these pages being accessible with ad hoc urls, automatically created by WordPress. As a first solution I tried to set the page as private and it seemed to do the trick: page was correctly displayed in the insert tag (testing from a desktop computer) but then I realized that using a smartphone the page is not rendered. Is there a way to do this properly?
I hope I made myself clear enh :)
Thanks

https://wordpress.org/plugins/insert-pages/

Paul Ryan
Member
Plugin Author

Posted 13 minutes ago #

Private pages are visible to admins only; you were probably logged in on your desktop computer, but not on your smartphone.
https://codex.wordpress.org/Content_Visibility#Private_Content

You could probably create a custom post type with the exclude_from_search attribute set to true, and those pages would be effectively hidden from the public unless you included them in any menus.
https://codex.wordpress.org/Function_Reference/register_post_type

That's the best solution I see to wanting to insert content that's not available anywhere it's not inserted. Note that it will still be accessible directly if someone knows the page ID (all content in WordPress is) via https://example.com/?p=123.

miks8715
Member
Posted 3 minutes ago #

Thank you for the quick answer! I'll give it a try
Cheers

Paul Ryan
Member
Plugin Author

Posted 3 seconds ago #

There's also plugins out there to build custom post types in the UI instead of in code, like:
https://wordpress.org/plugins/custom-post-type-ui/

Not sure if they include the exclude_from_search option, but worth looking. Good luck!

- - , .
.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 226 تاريخ : جمعه 25 تير 1395 ساعت: 1:03