Quantcast
Channel: Threads Archive - SiteOrigin
Viewing all articles
Browse latest Browse all 299

Getting the Post Id for use in get_widget_form

$
0
0

Hi,

I’m building a widget that relies on the page being edited to establish the child pages available for selection within the widget (as a dropdown). It seems I can’t reliably use $_REQUEST[ ‘postId’ ] because that isn’t available when the widget data loads via ajax and the preview doesn’t work.

Someone raised a similar query (question 1) a little while back and I’m wondering if this is now available?

I was using autocomplete but it’s overkill in this instance. Similarly showing all pages presents the user with more options than they need. Another option is to use get_page_by_path but this isn’t ideal as the path might change in future and silently break the link.

Hope you can help.
Thanks

The post Getting the Post Id for use in get_widget_form appeared first on SiteOrigin.


Viewing all articles
Browse latest Browse all 299

Trending Articles