• I am having a little trouble getting pods to display using shortcodes on a pods template through a page built with elementor, using the loop grid widget. The pods field values display normally, but when I add the taxonomy filter widget, I get “Pods embed error: Pod not found” where the pods should appear. The below is the test code I am using in the pds template. Thanks for your help.

    [if mannequin_range]
    Mannequin Range Pod: {@mannequin_chest}
    [/if]

    {@mannequin_chest} Field Value Mannequin Range Pod ~{@mannequin_range} Mannequin Style Pod *{@mannequin_style} Mannequin Code Pod *NA Mannequin Description PodNA Mannequin HeightNA Mannequin Upper ChestNA Mannequin Lower ChestNA Mannequin WaistNA Mannequin HipNA Mannequin Shoe SizeNA Mannequin ShoulderNA Mannequin HeelNA Mannequin AgeNA Mannequin ChestNA

    [if ID]
    Mannequin Range Pod: {@ID}
    [/if]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Paul Clark

    (@pdclark)

    Pod not found is an error which would come from the shortcode, which was not shared, rather than the template.

    The challenge is related to how Elementor is setting context for the current post context within its queries ran when filtering taxonomies. Depending on where the shortcode is placed, and what information Elementor provides to the loop when filtering taxonomies, the Pods shortcode may think it is referencing the taxonomy being filtered by, or the posts being returned by that filter, or the page on which Elementor is being used.

    The first thing to try to is set name="the_name_of_the_pod" explicitly on the shortcode. This way, the context of the query for the template does not need to be auto-detected.

    This may fix the behavior, or it may cause the shortcode to display many posts from the Pod, rather than specific posts for the taxonomy filter.

    If the latter is the case, solutions would be to either move the shortcode placement so it is within Elementor’s taxonomy filter query, or, if that query is not available as the main query, find how Elementor is tracking the filter sub-query, then pass the IDs of the relevant posts to the shortcode in PHP.

    Thread Starter websolprov

    (@wbsolprov)

    Thanks so much Paul, sorry for missing the valuable information. I have an elementor loop grid displaying mannequins in a range, there is an expandable elementor toggle panel showing the dimensions, and the pods are within that.

    The loop grid template has one toggle item called “specifications”, and the shortcode used in the elementor toggle widget to display the POD template is: [pods template="Mannequin Dimensions"], the wider POD template is as follows:

    [if mannequin_range]
    	Mannequin Range Pod: {@mannequin_chest}
    [/if]
    {@mannequin_chest}
    <table class="pretty">
      <thead>
        <tr>
          <th>Field</th>
          <th>Value</th>
        </tr>
      </thead>
      <tbody>
    	  <tr><td>Mannequin Range Pod ~</td><td>{@mannequin_range}</td></tr>
    	  <tr><td>Mannequin Style Pod *</td><td>{@mannequin_style}</td></tr>
    	  <tr><td>Mannequin Code Pod *</td><td>NA</td></tr>
    	  <tr><td>Mannequin Description Pod</td><td>NA</td></tr>
    	  <tr><td>Mannequin Height</td><td>NA</td></tr>
    	  <tr><td>Mannequin Upper Chest</td><td>NA</td></tr>
    	  <tr><td>Mannequin Lower Chest</td><td>NA</td></tr>
    	  <tr><td>Mannequin Waist</td><td>NA</td></tr>
    	  <tr><td>Mannequin Hip</td><td>NA</td></tr>
    	  <tr><td>Mannequin Shoe Size</td><td>NA</td></tr>
    	  <tr><td>Mannequin Shoulder</td><td>NA</td></tr>
    	  <tr><td>Mannequin Heel</td><td>NA</td></tr>
    	  <tr><td>Mannequin Age</td><td>NA</td></tr>
    	  <tr><td>Mannequin Chest</td><td>NA</td></tr>
      </tbody>
    </table>
    
    [if ID]
    	Mannequin Range Pod: {@ID}
    
    [/if]
    {@mannequin_chest}
    Plugin Support Paul Clark

    (@pdclark)

    In the context of using [pods template="Mannequin Dimensions"] within an Elementor loop, Pod not found means that Elementor is running the shortcode in a context which is not telling Pods that the data being queried in the loop is mannequin, assuming that is the name of the post type.

    Using [pods name="mannequin" template="Mannequin Dimensions"] might resolve it, but if Pods is not able to get information about what Post Type is being queried from Elementor, then it might cause a new problem where Elementor still might not tell Pods which mannequin ID/slug is being queried as the loop runs.

    To resolve it, one would either need to manually run the shortcode with both the name and ID or slug as arguments within the Elementor loop, like with a wrapping function or shortcode, or configure Elementor to populate the global $post object when running that particular loop module.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pods Custom Post Type / Shortcodes / Elementor’ is closed to new replies.