Navigation überspringen

[Gelöst] Toolset get relationship post return wp query object

This support ticket is created vor 3 Jahren, 7 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 4 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von Minesh vor 3 Jahren, 7 Monaten.

Assistiert von: Minesh.

Author
Artikel
#2200135

Hello, is it possible to return WP query object when using toolset_get_related_posts() API function instead of an array of IDs/post ojects? Thanks!

#2200513

Nigel
Unterstützer

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01:00)

The function toolset_get_related_posts doesn't use WP_Query, it performs a custom query, so there is no WP query object to return.

It retrieves the related posts and returns those either as an array of post IDs, or an array of post objects.

#2200529

Minesh
Unterstützer

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As Nigel already clarified that there is no option to return the WP Query object while using the toolset_get_related_posts() API function.

#2200817

Ok thanks, and is there any way to attach/append the post objects array to an empty newly created wpquery object?

#2200881

Minesh
Unterstützer

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Toolset it self does not offer such feature. It may or may not be possible using custom code but you will require to check with our certified partners:
=> https://toolset.com/contractors/