~/talk

Creating efficient WordPress Queries with WP_Query

Talkat WordCamp Nepal 2022 · 2022-11-05..11-06· [wordpress, databases]
links:none on file
slides:none on file

Explains concrete WP_Query tweaks: set no_found_rows true to skip the expensive COUNT, set update_post_meta_cache=false and update_post_term_cache=false when metadata or terms aren’t needed, avoid posts_per_page = -1 on large sites, and stop passing huge post__not_in arrays — instead filter IDs in PHP and skip in the loop. Recommends Query Monitor to find slow SQL, using transients for caching, avoiding raw $wpdb/get_posts unless necessary, and integrating Relevanssi or Search & Filter Pro for richer search. Mentions WordPress 6.1 query-result caching.

AI-written summary · about

~/search
type to search 6,518 conferences, 143,918 speakers and 192,133 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.