[Resolved] PODS and CPT archive templates

Home Forums Support PODS and CPT archive templates

  • This topic has 11 replies, 4 voices, and was last updated 4 months ago by David.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1504629
    Sean

    I am trying to build a staff directory with PODS and am having issues with the rendering of post archive pages.

    What I have so far:

    Custom post type called Staff Member
    PODS template called Staff Member – this correctly shows a few fields including a photo: http://demo.brandsavvy.co.uk/staff-member/john-smith/
    PODS template called Staff Member Archive – this refuses to show the image (I can pull in the image URL though) or any HTML formatting (in the example page ‘Location’ has strong and there is a <br> after each line: http://demo.brandsavvy.co.uk/staff-member/

    If I change the template to TwentySeventeen, for example, the PODS template works: https://ibb.co/xggYXpC

    I’ve tried with the GeneratePress Premium plugin disabled and the onlt other plugin I have installed is PODS.

    Any idea what’s happening?

    Thanks!

    #1505142
    Leo
    Staff
    Customer Support
    #1505934
    Sean

    Thanks for the response Leo

    Unfortunately not. I’m not using a featured image either – it’s a field in the custom post type created with PODS.

    I have the following in the PODS template:

    <ul class="staff-list">
    <li><img class="staff-image" src="{@photo._src}" />
    <div>{@first_name} {@last_name}</div>
    [if location]<div><strong>Location:</strong> {@location}</div>[/if]
    </li>
    </ul>
    <br>
    {@photo._src}
    

    That last {@photo._src} displays the image URL OK.

    None of the HTML styling is being rendered in the page at all. But if I use another theme then it does!

    #1506074
    David
    Staff
    Customer Support

    Hi there,

    in your Pods template – do you have Archives Enabled – i believe its under the Advanced settings.

    #1506551
    Sean

    Hi David

    Yes, in the Staff Member POD the Archive is enabled and the Archive View Template is set to the correct template.

    #1506993
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m not familiar enough with how PODs works when it comes to overwriting templates like this. Do they have any documentation on what’s required on the themes part in order for this to work?

    #1507336
    Sean

    Hi Tom

    Neither am I! Only started using it last week!

    All I found in the docs was this: https://docs.pods.io/themes/

    I’m using the PODS template to override the theme templates at the moment – but I am going to try and do it by editing archive.php in a child theme later if I can’t get it to work.

    Thanks

    #1507373
    David
    Staff
    Customer Support

    Have you tried PODs support ? Jim True is great and has experience with the GeneratePress. He may have a quick answer. As currently it looks like your PODs template is being output as the summary excerpt which by default would strip the HTML.

    #1507393
    Sean

    Hi David

    I have asked on their WordPress.org support but no joy there yet.

    I have just had a look at the settings in the Auto Template options tab and both the Single Template and Archive Template Filters were set to ‘the_content’

    Just out of interest I changed the archive filter to ‘the_excerpt’ and it now works!

    So thanks!!

    #1507521
    David
    Staff
    Customer Support

    Awesome – glad i was of some help!

    #1507679
    Sean

    PODS support have also said that the filter value may be different on certain themes – does the same on Twenty Nineteen!

    #1507729
    David
    Staff
    Customer Support

    I thought it would be quite common. Thanks for feeding back!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.