Support Forum ยป User Profile

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • bzxbzx
    Participant

    To answer your last question โ€“ I digged a bit more into the documentation & forum posts, and the solution would be to register another relationship, and create relations (reciprocal to simplify this) in the WP Admin..

    Actually, you asked this right in time, since I realised I would need this! ๐Ÿ™‚ I need to query all relationships between posts, which are from various categories, and I couldn't find any way to filter, as there is no category field returned from the API... unless there is?

    Thanks

    bzxbzx
    Participant

    In my example, my requirement is that both Authors and Books are posts (not the built in WP author role) โ€“ so in order to create a relation between them I am using MB Relationships โ€“ and I am connecting an Author TO the Book. If then I want to have a page showing all Authors and display their Books, I am using the get_connected() method from the API, but I need to specify the from keyword in the query arguments... You're right, it is not unintuitive โ€“ it's illogical ๐Ÿ˜‰

    bzxbzx
    Participant

    Thanks for your response!

    I understand that connections are bi-directional, but the API requires me to explicitly specify the keyword (relationship direction) in the arguments (from or to) โ€“ therefore I would expect the query to execute accordingly. Right now it is backwards, don't you think it's quite unintuitive?

    Simple example: Authors connected TO any Books they wrote. On the page showing Authors if I used to keyword in the query, it wouldn't show me any connections...

Viewing 3 posts - 1 through 3 (of 3 total)