D
D
Dmitry Klimantovich2021-10-03 21:06:46
WordPress
Dmitry Klimantovich, 2021-10-03 21:06:46

How to get pages in a custom field via json request?

Good afternoon.
I'm using the Pods - Custom Content Types and Fields plugin to create links between pages through a custom field in which, when editing a page, I can select several other pages, thereby creating a link, including a reverse one, that is, selected pages, also will link to this page.
6159f11977bd8219419585.jpeg

I also use the crocoblock plugin, which allows you to display pages in a block on a custom json request. But I don’t understand how I can get the ID of the values ​​​​written into it using this request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Zolin, 2021-10-03
@artzolin

Is it the wp_postmeta table ? Useget_post_meta()

$pods_relations = get_post_meta( get_the_ID(), '_pods_relations', true );

Or read the documentation, these plugins must have their own native functions to work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question