• I’m using the Essential Grid plugin on my site. I’ve created a (essential) grid of books from the books I maintain in mbm. In this grid I would like to display meta keys from mbm (e.g. cover, release date, price,…). But I can’t seem to access them. Does anybody know how I can access them

Viewing 1 replies (of 1 total)
  • Plugin Author mooberrydreams

    (@mooberrydreams)

    MBM stores most of its data in a custom table for ease of querying for book grids.

    If you want to access that data via custom code your best bet would be one of the following:

    • Instantiate a book object in your code like so:
      $book = MBDB()->book_factory->create_book( $id );
      where $id is your post_id
    • Look up the Book List class (includes/class-mbm-book-list.php) and use that to grab a list of books to display on your page that you can then loop through. (Be sure to pass true for $full_object)
    • Create your own query using a combination of the posts, postmeta, and books tables.

    Pros/cons:

    • The first two options are easiest to code but will require at least one database call per book on your page.
    • The third will reduce the database calls but require much more coding and studying of the table structures.
Viewing 1 replies (of 1 total)
  • The topic ‘use mbm meta fields in other plugins’ is closed to new replies.