admin管理员组

文章数量:1130349

I've Add a custom field to my products editing page with ACF.
Custom field name is my_seo_title ;
Each product has a unique SEO Title.
How can I use this field as an alt text and title for images in frontend?

I've Add a custom field to my products editing page with ACF.
Custom field name is my_seo_title ;
Each product has a unique SEO Title.
How can I use this field as an alt text and title for images in frontend?

Share Improve this question asked Oct 27, 2018 at 13:12 sarah millersarah miller 1
Add a comment  | 

1 Answer 1

Reset to default 1

You can use ACF function like this:

<?php get_field('my_seo_title') ? the_field('my_seo_title') : echo ""; ?>

inside alt tag or title tag at front-end.

I've Add a custom field to my products editing page with ACF.
Custom field name is my_seo_title ;
Each product has a unique SEO Title.
How can I use this field as an alt text and title for images in frontend?

I've Add a custom field to my products editing page with ACF.
Custom field name is my_seo_title ;
Each product has a unique SEO Title.
How can I use this field as an alt text and title for images in frontend?

Share Improve this question asked Oct 27, 2018 at 13:12 sarah millersarah miller 1
Add a comment  | 

1 Answer 1

Reset to default 1

You can use ACF function like this:

<?php get_field('my_seo_title') ? the_field('my_seo_title') : echo ""; ?>

inside alt tag or title tag at front-end.

本文标签: pluginsUsing custom fields for image alt and title