Replies: 1 comment
-
I've solved adding this code:
The c# code to access the field is:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently using the WordPressPCL library to interact with my WordPress site's REST API. I'm able to retrieve posts successfully, but I'm having trouble accessing the meta description of these posts.
I understand that the Post class in WordPressPCL has a Meta property, which (I think) should contain the post's custom fields. In my WordPress setup, I'm using the Yoast SEO plugin, which stores the meta description in a custom field named _yoast_wpseo_metadesc.
Here's the code I'm using to retrieve a post:
However, this doesn't seem to work. The Meta property doesn't appear.
I've read that the WordPress REST API doesn't include custom fields by default, and I tried to follow a tutorial which suggested to implement:
Could anyone provide some guidance? Any help would be greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions