Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine snippet variable suggestions list on Search Appearance #10273

Open
IreneStr opened this issue Jul 6, 2018 · 2 comments
Open

Refine snippet variable suggestions list on Search Appearance #10273

IreneStr opened this issue Jul 6, 2018 · 2 comments

Comments

@IreneStr
Copy link
Contributor

IreneStr commented Jul 6, 2018

In #10162, we've filtered out a lot of unwanted snippet variable suggestions for specific snippet editors on Search Appearance. However, we might be able to refine the lists further.

Open questions

  • Currently, %%tag%% shows up for all taxonomies (categories, custom non-hierarchical taxonomies). Is this intended?
  • Custom taxonomy names and descriptions show up for all custom taxonomies snippet editors. For example, if you have a movie custom taxonomy and a book custom taxonomy, "Movie (custom taxonomy)" and its description also shows up in the books custom taxonomy snippet editor.
  • Should custom taxonomy names and descriptions also show up for custom post types?
  • Should term404 also show up for pages?
@afercia
Copy link
Contributor

afercia commented Jul 6, 2018

One more (a subtle one) is: should "Archive title" show up for post types (and related taxonomies) that don't have a real archive? I.e. with has_archive set to false.

For example, what is the archive for posts and pages? It's true that WordPress fallbacks to an archive title "Archives" but they have has_archive set to the default false. Instead, for some custom post types is set to true e.g. Jetpack:
http://build.wordpress-develop.test/portfolio/
http://build.wordpress-develop.test/testimonial/

@jdevalk
Copy link
Contributor

jdevalk commented Jul 6, 2018

Currently, %%tag%% shows up for all taxonomies (categories, custom non-hierarchical taxonomies). Is this intended?

No.

Custom taxonomy names and descriptions show up for all custom taxonomies snippet editors. For example, if you have a movie custom taxonomy and a book custom taxonomy, "Movie (custom taxonomy)" and its description also shows up in the books custom taxonomy snippet editor.
Should custom taxonomy names and descriptions also show up for custom post types?

Hmm, is that hard to do? If so: no, otherwise: yes.

Should term404 also show up for pages?

No, it should only be available for 404 pages, because... Well, if it's a 404, a 404 page should be served, right?

One more (a subtle one) is: should "Archive title" show up for post types (and related taxonomies) that don't have a real archive? I.e. with has_archive set to false.

No. We special case two cases there that I know of: posts, with the blog page, and products, with the shop page, for woocommerce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants