studiopress / genesis-simple-faq

An accessible, performant WordPress plugin that adds FAQ management and rendering to your Genesis child theme.
10 stars 7 forks source link

Consider adding `public => true` to cpt_args #41

Open christophherr opened 6 years ago

christophherr commented 6 years ago

The three featured content plugins I checked (Genesis Featured Widget Amplified, Genesis Sandbox Featured Content and Six/Ten Press Featured Content) use this argument to show available CPTs in their "Content Type" selection.

Right now, Genesis Simple FAQs can't be used out-of-the-box with those plugins.

JiveDig commented 6 years ago

That is the 'go to' parameter for that sort of thing, but just because a post type isn't public doesn't mean it won't be displayed on the front end. I think the better parameter in this situation is to check if 'publicly_queryable' => true,

I have a few plugins that I want private (no automatic singular/archive view) but I want them displayed still, typically via a shortcode/widget/etc.

christophherr commented 6 years ago

The problem with 'publicly_queryable' => true, is that it still won't make GSF work with the featured content plugins.

JiveDig commented 6 years ago

I get that, but the problem with public true is that now we have archive and singular views for all FAQ's, which is an SEO nightmare and generally unwanted in most situations. That's why I opt for publicly queryable in these situations. Best of both worlds IMO. Though, doesn't solve your situation.

I think most devs default to checking for public post_types for this reason, not realizing that's not the best parameter for what they really want (typically), which is a post type that will be queried (displayed) on the front end.