• Resolved AnimeSubways

    (@animesubways)


    Hi there,

    so this is a bit more advanced query I guess.

    Basically I want to show the related Listings widget based on current post values. The relation between listings and the post pages is a custom taxonomy called “Car brands”

    The Goal is to have a Dynamic Post Template also to show specific listings based on the current post values (not Archive).
    Also to have Parent > Child functionality, which is not possible with “Pages”.

    I don’t want to have hundreds of Elementor post templates.
    See: https://ibb.co/HdsT2nP

    ___

    In the pods settings I’ve gotten so far, that only Listings of a specific listing type is shown in the post.

    What I added in the Custom Where field is:

    select ojj_postmeta.post_id from ojj_postmeta where ojj_postmeta.meta_key = '_case27_listing_type' andt.ID= ojj_postmeta.post_id and ojj_postmeta.meta_value = 'place'

    But how do I get the URL instead of a simple text of the listings?
    [pods field=’car_brand.url’] didn’t work for me…

    I would like to automate it a bit more.

    Currently I have to choose the specific listings manually in the post but the widget should show specific listings based on the taxonomy value automatically which was chosen by the user.

    For example:
    User A chose “BMW M4” (from a custom taxonomy) in his listing to display it. Then on the detail page of “BMW M4 (Dynamic Post Page A)” the Listing URL of User A should appear there.

    User B chose “Audi A1” in his listing.
    Detail page “Audi A1 (Still Dynamic Post Page A) should show the Listing URL of User B”

    User C also chose “BMW M4” in his listing to display it.
    Now the Detail page of “BMW M4” should show 2 Listing URL of User A and User B.

    and so on..

    Hope you can help me with that

    • This topic was modified 2 years, 9 months ago by AnimeSubways.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @animesubways

    Sorry for my late reply, didn’t notice this topic.
    Have you figured it out in the meantime?

    Let me know!
    Cheers, Jory

    Thread Starter AnimeSubways

    (@animesubways)

    Hi there, unfortunately I still did not getting it to work with
    [pods field=’car_brand.url’] or anything

    • This reply was modified 2 years, 8 months ago by AnimeSubways.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @animesubways

    First a few questions:
    – Is it running the shortcode at all?
    – Is it returning a brand at all? [pods field="car_brand"]
    – It’s better to use permalink instead of url.
    – Did you debug the query, is it returning anything?

    I don’t really understand your where query formatting:
    select ojj_postmeta.post_id from ojj_postmeta where ojj_postmeta.meta_key = '_case27_listing_type' andt.ID= ojj_postmeta.post_id and ojj_postmeta.meta_value = 'place'

    First of all, it’s already a SELECT query so that shouldn’t be in a where param.
    Other than that, you are refering to actual tables, this isn’t necessary and most likely won’t work. Did you check our documentation?
    https://docs.pods.io/code/pods/find/
    https://docs.pods.io/displaying-pods/pods-shortcode/

    Cheers, Jory

    Thread Starter AnimeSubways

    (@animesubways)

    Hi Jory,

    1. Yes, I am getting an output but only the name of the listing as plain text
    2. Yes
    3. This is working [pods field=’car_brand.permalink’] to get the URL, thanks!
    4. Yes I build up the Query with the database and Pods Admin, its working fine

    I had to build up the Where Query because of the Database- and Table Structure. Some table columns were connected with INNER JOINs for the Theme and to get it together for Pods I had to connect these different tables within the Where Condition because Pods does not provide Inner Joins.

    See it’s working:
    https://ibb.co/qFQGzVB

    Basically this is resolved now!

    Can you provide a list of Pods Shortcode parameters like:
    – .permalink
    – .name
    – etc?

    • This reply was modified 2 years, 8 months ago by AnimeSubways.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @animesubways

    Good to hear you’ve solved it!
    Our magic tag documentation can be found here:

    https://docs.pods.io/displaying-pods/magic-tags/
    https://docs.pods.io/displaying-pods/magic-tags/using-magic-tags/

    Cheers, Jory

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using MyListing Theme: How to output listing urls with specific taxonomy value?’ is closed to new replies.