• Resolved kflai63

    (@kflai63)


    HI,

    Thanks for a great tool which I have been using in many of my sites.

    In a recent site, I created 2 custom post types: “Content” and “Publisher”. There is a field in Content called “publisher” which is a bidirectional related field to “Publisher” type.

    In the Advanced Field Options, I want to “Customized WHERE” to allow selection from only the publishers that this author has created (but not other publishers created by other authors). I can figure out how to put in a specific author’s ID, for example, “post_author = 6”, and this works.

    However, how do I generalise this to a variable, “post_author = ???”, so that this logged in user (an author), only see the items that he/she has created?

    Thanks a lot

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kflai63

    (@kflai63)

    I think I figured this out:

    1. add define(‘PODS_SHORTCODE_ALLOW_EVALUATE_TAGS’,true); to wp_config.php
    2. Customized WHERE : post_author = {@user.ID}

    This will allow the author to see the items that he/she has created.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @kflai63

    Correct! Good find ??

    Cheers, Jory

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customized WHERE to select only own posts’ is closed to new replies.