• Resolved mnasmark

    (@mnasmark)


    Hello all!

    What I am trying to do is to select a post of another post type and display address information from the elected post. The ‘kartotek_producent_nr’ is the field name of the producer in the post type “Stentyper” (current post type). All the producers are of the post type “Stenleverantor” where ‘producent_nr’ is the field name of the same variable. Both fields have the same type – numeric. This does not work, and when ever I add ‘exists’ after loop the image on the right stops displaying.

    
    [pass prod_nr=kartotek_producent_nr]
    [loop exists type=Stenleverantor field=producent_nr value='{PROD_NR}']
      [the-loop]
      <strong>Producent: </strong>[field title], [field pnr] [field adress]
      [/the-loop]
    [/loop]
    [/pass]
    

    Anyone have an idea?

    • This topic was modified 5 years, 5 months ago by mnasmark.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello!

    Please try the following:

    [pass field=kartotek_producent_nr]
    [loop type=Stenleverantor field=producent_nr value='{FIELD}']
      <strong>Producent: </strong>[field title], [field pnr] [field adress]
    [/loop]
    [/pass]
    

    The pass shortcode is used like field=x, where “field” is the literal word and “x” is the field name.

    I hope that helps, and sorry I’ve been absent from the support forums.

    Thread Starter mnasmark

    (@mnasmark)

    Thank you, Eliot
    So glad you could help me out.
    /Magnus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Select one post from a shared field’ is closed to new replies.