I’m trying to fill WP SEO Structured Data Schema fields with add_post_meta function and it doesn’t work properly. I checked one of the posts that’s added from WordPress admin panel and it was saved like this:
I am trying to create two custom fields for image and text.
I have two inputs in the loop:
I created ACF repeater field for custom taxonomy terms. Repeater consist of two field “Question” and “Answer” . By this way I want to create FAQ section for each taxonomy term.
Thought I can show other custom fields easily in archive field, But I could not succeded with repeater field . Please help me.
All my posts have a custom field named date-start-custom
. The value of the custom field is in the date format YYYY-MM-DD HH:MM
(e.g: 2021-06-15 14:30), and I want to only list posts that has a date later than the current date.
In my project the WP users have a custom meta field “usergroup” containing a comma separated list of values. The meta field can contain values like this:
In Gutenberg there’s the getEntityRecord
selector that allows you to get the data of a post of a specific post type:
In a plugin I’m building for Gutenberg, I register a meta field named _related_posts
, which stores an array of post ids:
I am developing a plugin that has a custom post type. This post has a lot of meta data but I also need to attach some images to this post. What is the best way to upload an image that is related to my custom post type? I have seen some functions like media_handle_upload() and media_sideload_image() but I don’t know if they are the best solution and if so how to implement them in my code.
For the text fields I use this format
I cannot see the option to enable WordPress custom fields, and no, I have not installed or used Advanced Custom Fields Plugin for WordPress. I also disabled my functions.php (just in case) but with no luck. How can I see custom fields to enable it?
I am trying to call wp_set_object_terms in a function hooked to custom post creation (via wp_insert_post_data) to set taxonomies tags for the post from a custom field: