WordPress.org

Ready to get started?Download WordPress

Forums

WP3.1-RC4 & filter query (with meta key) not working (4 posts)

  1. grosbouff
    Member
    Posted 3 years ago #

    Hey, i've made a plugin to allow visitors to post from the frontend.
    The posts are saved with a particular user which is the "guest" account; and when the visitor writes a post, he has to fill his name & email (custom fields).

    The problem was that when displaying the posts from the "guest" account; all posts were listed and not only the posts by this particular visitor.
    So I added a filter on queries (when doing an author query); which checks the email meta key if the author queried is the "guest" one.

    When printing the query_vars of my query, I have
    [meta_key] => oqp_guest_email
    [meta_value] => test@test.com
    which is what I want.
    So only the posts which have that meta key and value should be returned.

    But It does not work; it returns all posts from the "guest" acount.

    I think it WAS working before I did the upgrade.
    Any idea ?
    Here's the full code & explanations :
    http://pastie.org/1579364

    Thanks a lot !

  2. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

    Can you try this again on RC5?

  3. grosbouff
    Member
    Posted 3 years ago #

    Hi, where can I get it ? I searched; but wasn't able to find a link to this release...

  4. DavePorter
    Member
    Posted 3 years ago #

    Use the WordPress beta plugin...

    http://wordpress.org/extend/plugins/wordpress-beta-tester/
    HTH Dave

Topic Closed

This topic has been closed to new replies.

About this Topic