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

Support custom fields in meta title and description #79

Open
touchdowntech opened this issue Oct 27, 2023 · 1 comment
Open

Support custom fields in meta title and description #79

touchdowntech opened this issue Oct 27, 2023 · 1 comment

Comments

@touchdowntech
Copy link

I have a custom field for a client's lead time. I like to have the lead time in the meta description or title of some pages. I'm using Meta Box's settings page and custom field to save this info and I use it throughout the website. When I tried to use the shortcode in the title of TSF it didn't show the value of the field. It showed the shortcode text instead.

I think this would be a great feature to add because it's great to have centralized control for some pieces of information that we may want to use in the meta title or description of a page.

What do you think?

@sybrew
Copy link
Owner

sybrew commented Oct 31, 2023

Hello!

Sorry for the delay.

You can enable shortcodes in custom fields using these filters:

add_filter( 'the_seo_framework_custom_field_description', 'apply_shortcodes' );
add_filter( 'the_seo_framework_title_from_custom_field', 'apply_shortcodes' );

Here, you can learn where to place them: https://tsf.fyi/docs/filters#where.

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

No branches or pull requests

2 participants