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

[Enhancement] Provide ability to output category count as a template variable #12185

Open
Pcosta88 opened this issue Feb 6, 2019 · 2 comments

Comments

@Pcosta88
Copy link
Contributor

Pcosta88 commented Feb 6, 2019

Is your feature request related to a problem? Please describe.

User want to show a quantity of a certain category

For example if my primary category is "Beaches" I'd like to add:

"Top %%primary_category_count%% Beaches in Hawaii" which would show

"Top 35 Beaches in Hawaii" or whatever the category count is.

Describe the solution you'd like

Add %%primary_category_count%% as a template variable

why you think the feature request is something we should consider for the Yoast SEO plugins?

Improve UX otherwise users need to try to build it themselves using filters here: https://gist.github.com/amboutwe/550c10ede7d065d9264930f5480ca748#file-yoast_seo_title_custom-variable-php or working with a Yoast Partner to develop the code.

@Pcosta88
Copy link
Contributor Author

Pcosta88 commented Feb 6, 2019

Please inform the customer of conversation # 472041 when this conversation has been closed.

@jonoalderson
Copy link

I can see a use-case for this on archive/taxonomy templates, but less-so on posts/pages.

Therefore, I think %%category _count%% makes more sense than %%primary_category_count%%.

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