A
A
AlexeewAlex2021-08-08 09:48:40
WordPress
AlexeewAlex, 2021-08-08 09:48:40

Is it necessary to use WP_Query in Wordpress?

Hello.
I need to filter products in woocommerce by attributes and additional fields.
Usually this is done through WP_Query, through WP_Query you can form any selection.
But I need to optimize the selection as much as possible, there are many reasons for that. If I get all records in pure sql and just print foreach, will it improve performance?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2021-08-08
@AlexeewAlex

will it improve performance

Yes. Since you will bypass all hooks, serialization checks and error handling from the VI.

P
Programmir, 2021-08-08
@Programmir

Or you can not use Wordpress at all. Use pure PHP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question