How can I incldue a “private” post type in a loop for public users?

Figured it out, it was simpler than I expected. /** * Include catalog posts in archives, even though they’re not “public” * * @param WP_Query $query * @return WP_Query */ function wpse415668_catalog_posts_in_archives(WP_Query $query): WP_Query { if (! $query->is_admin() && $query->is_main_query() && $query->is_tax(“catalog_category”)) { $query->set(“post_type”, “catalog”); } return $query; } add_filter(“pre_get_posts”, “wpse415668_catalog_posts_in_archives”);

How can I make my blog private? [closed]

I finally found something (I think): Network Privacy is currently in version 0.1.4 but looks just about right. When installed, there’s a new Privacy setting screen where I can choose, e.g. I would like my site to be visible only to Site contributors. Given that new users automatically get the permission level Subscribers when they … Read more

Exceeded the virtual memory limit

It is impossible to guess how is memory spent in your site. In context of WordPress it will simply obey PHP memory limit and will crash upon reaching it. Your description sounds more like the total of server memory, which isn’t just WP, but everything on server (including web server software, database software, and so … Read more

AJAX requests within templates

Security through obscurity isn’t a good pattern to follow. You have to have a URL to make XHR or JSONP calls. Anyone who knows anything about searching the DOM using developer tools, Firebug, etc… can easily find your remote script URL. To me, this is the wrong question to ask. The more relevant question to … Read more

WordPressMu network with private sites

By deafault, any sub-site is open to public. You would need to add code to check if a user is logged in. And if user is logged in, does he have the right priviliges? What I would do, is to create one new role for each sub-site. Then when a new user registers, I would … Read more