Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Dynamic Content Block in Query Loop

  • We can use the Dynamic Content block to show post content in a Content Template. Is there a way to use to insert a Dynamic Content block for within a Query Loop. The only way I can show full post content at the moment is to force an Excerpt (GB Text block) to full content using a custom function. Is there a better way?

  • Hi Ian.

    You could potentially move your query loop inside an Element as a loop template and use the dynamic content block there, would that work for you?

  • Hi George,

    Thanks for the suggestion. Although that may work, I don’t think it’s the best method for this use case. The idea is to use the query loop to populate a Team page listing all team members. Using a block element would require an additional inserting of said element into the page.

    Sounds like using a custom snippet to force excerpt as full content for this specific page is the better way to go. I think this makes it easier to manage in the long run.

    May I ask if there are negative implications for making the dynamic content block available outside of elements?

  • Hi Ian.

    The solution I suggest is the following. The team page could be a blank page. The Loop Template would be an element set as a Loop Template. You could have your query loop in there with the dynamic content block and a condition for the element to appear for the team page you have created. You could have content before and after the loop.

    Is saying that, your current solution is totally fine, no negative implications. Another approach you could take is have the main content as a custom field (maybe a text area?) and display that as a post meta.

    Hope that helps.

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