- This topic has 11 replies, 3 voices, and was last updated 3 years, 8 months ago by Tom.
-
AuthorPosts
-
August 4, 2020 at 11:34 am #1387296Stonebriar Webmaster
Thanks for the wonderful theme and premium plugin. I’m using a child theme of GeneratePress with SiteOrigin’s Widget Bundle and PageBuilder.
I’m trying to get use SiteOrigin’s Post Loop widget to replicate what the GP Premium archives already look like on my Blog page. Specifically, I can’t find a way to display each post’s entry-meta section (date and author) after the posts’ title inside the SiteOrigin Post Loop on my PageBuilder page.
Interestingly, the footer entry-meta does display for each post, which I also need. ๐
I’ve tried adding code to my child theme’s functions.php page, but I need some help with an example to try.
Thanks in advance!
August 4, 2020 at 11:36 am #1387302LeoStaffCustomer SupportHi there,
Not sure if I fully understand but this sounds like something you will need to check with Site Origin’s support?
Let me know if I’m missing something here.
August 4, 2020 at 11:53 am #1387334Stonebriar WebmasterI am using the GP content.php file as my SiteOrigin Loop template. Everything else seems to work except for some of the post meta data not coming in. I initially thought it was because those items get turned on by GP Premium under Layout > Blog in the WP Customizer; and that perhaps I needed to hook into a GP Premium function somehow to make them display inside the SiteOrigin Post Loop.
I like the clean efficiency of the GP Theme code, so I wanted to work within that model if possible before trying to put something inferior together.
Can we please look at this again with this extra info?
August 4, 2020 at 1:39 pm #1387441TomLead DeveloperLead DeveloperHi there,
A lot of the post meta will only display if it’s the
post
post type:
https://docs.generatepress.com/article/generate_entry_meta_post_types/
https://docs.generatepress.com/article/generate-footer-meta-post-types/Perhaps that’s the issue?
August 4, 2020 at 3:25 pm #1387532Stonebriar WebmasterTom, I think I may have resolved my issue, but I have a question about how the GP Header Element uses Template Tags.
My issue was that in the GP Header Element that I was using as my Global Header was using {{post_date}}, {{post_author}}, and {{post_terms.taxonomy}} Template Tags. And, on the SiteOrigin Page, these pieces of data would not render in the Post Loop. Sadly I had forgotten that I previously saw this same behavior on the main Blog and Archives. My earlier “solution” for the Blog and Archives was to create a special Header element that did not use those Template Tags, only using {{title}} Template Tag.
My question is if there is another way to use Template Tags like {{post_date}} in a Header element and still have post dates display for each entry inside the loop on Blog/Archive pages. Maybe there is a hook (e.g.: “generate_after_entry_title”) to “reset” the fact that I already “used up” those variables in the Header element?
If the best solution is to duplicate Header elements, I’ll do that, but I wanted to ask if there was a better way.
Thank you for the help so far,
BillAugust 5, 2020 at 8:29 am #1388413TomLead DeveloperLead DeveloperSo when you used those template tags, those elements were removed from the posts in the loop?
August 5, 2020 at 10:47 am #1388544Stonebriar WebmasterTom:
That is correct. If I use a template tag (e.g.: {{post_date}}) in the Header element that is displaying on the Blog or Archives page, then the post’s date is removed from each of the posts listed in the loop on that WP “page”.
Thanks,
BillAugust 5, 2020 at 12:43 pm #1388673TomLead DeveloperLead Developer{{post_date}}
is meant to get the date from the current post, which is why it’s conflicting on archive pages. What date are you trying to display there? The date from the latest post?August 6, 2020 at 9:09 am #1389734Stonebriar WebmasterTom:
I am using the same header element on the entire site. The {{post_date}} in the global header was meant for a page’s date, and on a Blog/Archive page there is no {{post_date}} and the template tag renders as “{{post_date}}”, which I had hidden using CSS. I’m okay with no post date showing in the Header Element when it is on an Archive page. This conflict however omits each post’s date information from the entry-meta of each post listed. However, I was trying to display each post’s date in the list.
It seems like my 2 options are:
1) to create multiple Header elements for various uses (pages vs. blog/archives/search vs. posts)
2) to program my one “header element” functionality using a Hook element insteadI can work around this limitation if I need to; I was wanting to make sure a work-around was the correct way to build this out if there was not something I was not knowing how to do in order to use the theme the preferred/designed way. (I prefer to work with a theme and plugin as much as possible before I create any overrides.)
Thank you for your help so far. I think I’ll proceed with option 1 above unless you know of a way around the conflict I have in this situation.
Thanks again!
BillAugust 6, 2020 at 2:29 pm #1390238TomLead DeveloperLead DeveloperI would create two different Header Elements, one with the post date and one without. It would be nice if we could add conditionals in the future that you could set – it’s something we’re working on.
August 6, 2020 at 3:23 pm #1390311Stonebriar WebmasterThank you for your attention to this ticket and helping me think through how to best build things out.
We are very grateful for your theme and Premium plugin.
Thanks!
BillAugust 7, 2020 at 8:28 am #1391656TomLead DeveloperLead DeveloperGlad I could help! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.