post_parent returning 0
-
Hi there,
I followed a tutorial on the PODS framework and created a custom post type called ‘product’ with four fields “info”, “weight”, “price” and “images”, and three different products.
Then I created two templates, one for each individual product and another for a list of products. On the ‘product’ archive page, I choiced in the list template ‘images’ and ‘price’ fields. I tried to create a link from the image to the product detail page using the following code
[each immagini]
<p class="immagini--prodotto"><a href="{@post_parent,get_the_permalink}"><img src="{@guid}"></a></p>
[/each]by following the instructions in the tutorial. The link, however, points to a page that doesn’t exist.
Furthermore, I noticed in the
wp_poststable, in thepost_parentfield, an index value ‘14’, which is passed to the URL, creating the link to the page that does not exist, as mentioned earlier. In the tutorial, the link seems to work. Unfortunately, I have tried several times without success…I’ve seen what’s have been written at the page https://docs.pods.io/displaying-pods/image-media-fields-reference/ and I think the tutorial refers to this page. But I think that’s no longer the case, or am I wrong?
Thank you in advance,
Claudio
You must be logged in to reply to this topic.