Support » Plugin: Now Reading Reloaded » [Plugin: Now Reading Reloaded] Accessing custom fields

  • Resolved Jeff

    (@jmf)


    I’m trying to use custom metadata in my library entries, without any luck. I have a custom key ‘book_desc’ for example, with some copy in the value box.

    Using the obvious(?)
    $desc = get_post_meta($post->ID,'book_desc',true); echo $desc;
    in my template doesn’t produce any output. Tried replacing “post” with “book” in the above, just for kicks, with no result, either.

    Using the_meta() gives me metadata from a post on my blog, but nothing to do with the books I’m working with.

    Has anyone had success with custom metadata? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can’t use the standard WP meta function because NRR uses its own tables. I’ve been working on changing this (and updating NRR to work nicely with WP 3.1) and have mode quite a bit of headway in the Amazon Media Libraries plugin. You’ll want to use get_book_meta(), update_book_meta(), and delete_book_meta() at least until AML gets production ready.

    Thread Starter Jeff

    (@jmf)

    Ah, yes — thanks! And I just found print_book_meta() in the ‘single’ template — should have looked there first!

    Appreciate the help, and glad to hear the plugin’s still being worked on!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Now Reading Reloaded] Accessing custom fields’ is closed to new replies.