• midweek

    (@midweek)


    Hi – on my blog posts, I want to display one or two fields from a events plugin table into the relevant blog post.

    So lets say my plugin uses a table called “Events”

    How, in my Single Post page code, could I query the “events” table to extract one or two fields for that post, ie: Date, City etc

    I’m totally new at this…

Viewing 1 replies (of 1 total)
  • superyetkin

    (@superyetkin)

    Yes, you can.

    $res = $wpdb->get_results(“SELECT Date, City FROM ” . $wpdb->prefix . “events”);
    foreach ($res as $e) { … }

    Donate if this helps you.

Viewing 1 replies (of 1 total)

The topic ‘Displaying fields from a separate plugin table’ is closed to new replies.