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.

How to have dynamic data pull in to a query loop filter

  • Hello,

    I have a directory website with 1,000’s of directory profiles. I’m trying to add an element on each profile that shows up above the footer with quick links to applicable pages. For example, if they are looking at a bakery profile, I would want the quick links to be relevant to bakeries in the same area of the bakery profile they are looking at. I have all of this meta data set up to easily filter automatically but because I’m using an element that will be added to every directory profile, I was wondering if there is a way to use dynamic data with a query loop’s filtering option. When I go to add parameters I don’t see an option for dynamic data. The goal is to use one element and then what appears in the element will change based on the meta data of the profile they are looking at. Is this possible?

    Thanks!

  • Hi there,

    Do you have GenerateBlocks Pro? You would need your query to be created using the Current Post data, which is a GB Pro feature – see here: https://generateblocks.com/creating-related-posts-with-query-loop-block/

  • I do not, but I will get it. Thanks so much!

  • Following up here:
    I purchased GenerateBlocks Pro and see the functionality that the URL goes over that you shared.
    I have a follow up question, though.
    All of my directory profiles are using a custom post type with taxonomies for Area and Business Category. I see how I can pull in similar profiles dynamically based on these categories, but I’m wondering if there is a way to pull in pages using these categories?
    Is there a way to add taxonomies to my pages so that this feature could pull those in dynamically?

    To give you an idea of what I’m trying to do:
    If someone is on a bakery profile and the bakery has taxanomies for XYZ town and ZYX category, I’d like to pull in pages (ex. “best ice cream shops in XYZ town”) that correspond to the taxonomy of the profile the user is viewing.

    Is this possible?

  • Is there a way to add taxonomies to my pages so that this feature could pull those in dynamically?

    You can add custom taxonomies to pages via a plugin like ACF or CPT UI.

    Then you can use query loop block to pull the pages with parameter this taxonomy (area) > current post terms.

  • Thank you!

  • No Problem 🙂

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