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

Meta descriptions aren't output when using ACF macro in Description Format #960

Closed
wpsmort opened this issue Jul 13, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@wpsmort
Copy link
Member

commented Jul 13, 2017

When you use the ACF macro (https://semperplugins.com/documentation/advanced-custom-fields-integration-with-title-format-fields/) in the Description Format field then no meta description is output unless content exists on the post and Autogenerate Descriptions is enabled.

To reproduce this, create a custom post type and then use Advanced Custom Fields to create a field called Custom Description.
Next, create a post in your new CPT and complete only the Title field and the Custom Description field.
Next, change the Description Format in AIOSEOP to %cf_custom_description%.
Check you post and you should see no description. Now enable Autogenerate Descriptions and there should be no change.
Finally, edit your post and add some content in the Editor. Now check and you should see your custom field output as the meta description.

I believe what is happening here is that when we generate meta descriptions we run through to see if there is content and if there's no content we don't do anything. What we need to do is check to see if there is a custom field before returning nothing.

See also #959

@wpsmort wpsmort added the Bug label Jul 13, 2017

@wpsmort wpsmort added this to the 2.3.15 milestone Jul 13, 2017

@wpsmort wpsmort modified the milestones: 2.3.15, 2.3.16 Aug 3, 2017

@wpsmort wpsmort modified the milestones: 2.3.16, 2.3.17 Aug 17, 2017

@wpsmort wpsmort modified the milestones: 2.3.17, 2.5 Sep 5, 2017

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jan 16, 2018

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2018

PR: #1483

@wpsmort wpsmort assigned michaeltorbert and unassigned wpsmort Feb 13, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Mar 7, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Mar 7, 2018

@michaeltorbert michaeltorbert removed their assignment Mar 19, 2018

@michaeltorbert michaeltorbert modified the milestones: 2.5, 2.6, Future Release Mar 20, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jul 27, 2018

@wpsmort wpsmort modified the milestones: Future Release, 2.8 Aug 3, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Aug 8, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Aug 28, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Aug 30, 2018

michaeltorbert added a commit that referenced this issue Aug 30, 2018

Meta descriptions aren't output when using ACF macro in Description F…
…ormat (#1483)

* Meta descriptions aren't output when using ACF macro in Description Format #960

* test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.