Site logo

[Resolved] Block Loop Element on Archive Page Only Displays One Item

Home Forums Support [Resolved] Block Loop Element on Archive Page Only Displays One Item

Home Forums Support Block Loop Element on Archive Page Only Displays One Item

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #2590721
    Samuel

    Or to say it differently is there any way to insert/modify dynamic data in a QueryLoop on an archive page other than the standard built in dynamic data sources? Is there any way to extend those? I thought shortcodes would be an easy way to do it since it works perfectly on archive loops in general. But apparently the QueryLoop works different than the normal archive loop.

    #2590981
    Ying
    Staff
    Customer Support

    Shortcodes don’t work well with query loop, it’s a WP thing, you need to use the render_block filter to do_shortcode.

    #2590986
    Ying
    Staff
    Customer Support

    for example, if there is a link in one ACF field the title needs to be a link.

    You can have different data source for the text and the link, have you tried that?

    #2591054
    Samuel

    Great suggestion, but in my case I have to calculate if a link was supplied. Looks like I simply have to use the renderblock filter. I was just surprised that shortcodes which work on a normal archive page don’t work if you use the QueryLoop.

    I’ve solved the problem for new using the render_block filter. Thank you for pointing that out.

    #2591066
    Ying
    Staff
    Customer Support

    but in my case I have to calculate if a link was supplied.

    If the link doesn’t exist, GB will generate no link for the title, so you don’t need to calculate that if this is the case.

    I was just surprised that shortcodes which work on a normal archive page don’t work if you use the QueryLoop.

    Yes, we can’t get around it as it’s a WP limitation.

    But glad you’ve sorted it 🙂

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.