- This topic has 11 replies, 4 voices, and was last updated 1 year, 8 months ago by
David.
-
AuthorPosts
-
October 26, 2020 at 7:37 am #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!
October 26, 2020 at 10:57 am #1505142Leo
StaffCustomer SupportHi there,
Does this help?
https://generatepress.com/forums/topic/get-contents-of-custom-field-associated-with-featured-image/Let me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 27, 2020 at 3:53 am #1505934Sean
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!
October 27, 2020 at 5:53 am #1506074David
StaffCustomer SupportHi there,
in your Pods template – do you have Archives Enabled – i believe its under the Advanced settings.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 27, 2020 at 8:19 am #1506551Sean
Hi David
Yes, in the Staff Member POD the Archive is enabled and the Archive View Template is set to the correct template.
October 27, 2020 at 2:03 pm #1506993Tom
Lead DeveloperLead DeveloperHi 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?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 28, 2020 at 1:45 am #1507336Sean
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
October 28, 2020 at 2:13 am #1507373David
StaffCustomer SupportHave 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 28, 2020 at 2:29 am #1507393Sean
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!!
October 28, 2020 at 4:22 am #1507521David
StaffCustomer SupportAwesome – glad i was of some help!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 28, 2020 at 6:35 am #1507679Sean
PODS support have also said that the filter value may be different on certain themes – does the same on Twenty Nineteen!
October 28, 2020 at 7:15 am #1507729David
StaffCustomer SupportI thought it would be quite common. Thanks for feeding back!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.