• Resolved junkes

    (@junkes)


    Hey,

    I have a CPT created with Pods called CD and another one called Artist. They are related by a bidirectional field. So, when I used to use [each cds] in the Artist single auto-template, I could use {@post_content} normally.

    But, now that I want to use [pods name=”cd” where=”artist.ID = ‘{@ID}'” orderby=”year.name ASC” template=”List of Cds”] to order the CDs by the year they were released, the page doesn’t load fully. It takes forever and just load the header of the page, not any content inside the single auto-template. If I take the {@post_content} out of the “List of Cds” template, it loads normally.

    What’s going on? Does it have something to do with the hook (the_content) I use for the auto-template? Is there something I can do to keep using the {@post_content}?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @junkes

    Since “Artist” is a meta field (relationship), please try artist.meta_value for the where param.
    Let me know!

    Cheers, Jory

    Thread Starter junkes

    (@junkes)

    Sorry, @keraweb, but I didn’t get that. Do you mean like [pods name=”cd” where=”artist.ID = ‘{@artist.ID}’” orderby=”year.name ASC” template=”List of Cds”] ??

    Anyway, the thing is, I’m being able to display the CDs info correctly if I don’t use the field {@post_content} in the “List of CDs” template (also, when I use the @post_content field, the page loads for a long time and display nothing but the header).

    All fields are being displayed correctly when I don’t use the {@post_content}, so I think the where param is working fine there.

    Is it possible that the where param affects only the {@post_content} field?

    • This reply was modified 3 years, 10 months ago by junkes.
    • This reply was modified 3 years, 10 months ago by junkes.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @junkes

    Could it be that you’ve enabled auto templates? If so, I think there might be a loop going on in the content. Could you check?

    Cheers, Jory

    Thread Starter junkes

    (@junkes)

    I also think that, @keraweb. Even more because it only happens with the @post_content tag. But how could I easily test that? If I disable auto templates, than the Artist single page won’t load with that template and I wouldn’t be able to test it, right?

    Anyway, if that’s the case, is there a way to bypass that? Or maybe I shouldn’t be using @post_content in auto templates templates that are using the_content hook?

    And if that’s the case, I have a Pods/Wordpress question about it: why it works using [each] and it doesn’t when I use a shortcode to get another template?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @junkes

    If I test using the @post_content tag locally it works fine while replacing the post content on the the_content hook. Even when trying to create a content loop (load pages within pages) it works without issues.
    So normally you should be able to do this without problems.

    I think it’s best to create a full bug report on GitHub so we can investigate further.
    Could you please make sure to provide all information asked? Especially the steps we need to take to fully reproduce your installation?
    https://github.com/pods-framework/pods/issues/new?assignees=&labels=Type%3A+Bug&template=bug_report.md&title=

    I’m closing this topic in favor of GitHub. Hope to hear from you!

    Thanks! Jory

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘The page doesn’t load using {@post_content}’ is closed to new replies.