• Hello , I want to using wpdb queries like get_results inside a custom shortcode which defined in theme functions.php. But when i trying to using it on a page, the website gets A Serious problem has occurred on your website.
    What can i do about it ?

    best regards.

    • This topic was modified 4 years, 8 months ago by TheXrion.
    • This topic was modified 4 years, 8 months ago by TheXrion.
    • This topic was modified 4 years, 8 months ago by TheXrion.
Viewing 1 replies (of 1 total)
  • Dion

    (@diondesigns)

    What you can do is tell us what the “serious problem” is, and/or show us the code for the shortcode function. Otherwise we’re forced to read your mind, which probably won’t be very successful. ?? But here’s a guess…did you declare $wpdb as a global variable in your shortcode function?

Viewing 1 replies (of 1 total)
  • The topic ‘Cannot using wpdb queries in shortcode’ is closed to new replies.