Home>Support>Set loop with custom query – CFS Custom query for Siteorigin Loop

Set loop with custom query – CFS Custom query for Siteorigin Loop

Hi, I need to set a loop of content by using siteorigin LOOP widget.
So what i need deeply is a custom query that shows me only custom fields loaded in the specifica article.

I tried to set
POST QUERY = ALL
and POST IN = pages where i loaded documents (via custom fields ‘custom field suite’)

But it doesn’t work

I changed
POST QUERY = MEDIA

but no result so i image to use a custom query. But i don’t know how to do.

So can you pls helpme to create this custom query?
Pages where are loaded documents are id 317,334 and custom field is named ‘allegato’
…if this helps:
$fields = CFS()->get( ‘allegato’ );

thanks for your help

This is a free community support forum. Replies are not guaranteed. If you need professional email support, please purchase a SiteOrigin Premium license.

  1. 9 days, 6 hours ago Alex S Hi, I Work Here

    Hi M,

    Set the Post in field to your desired posts (you’ll need to select them from the list rather than typing in the ids). Then set the Additional field to:

    meta_key=allegato
    

    How does that look?

  2. 8 days, 6 hours ago m.civita

    Hi, sorry but doesn’t work.
    I added your code into the “additional” field but nothing changes.
    The page should show me all attachments that are included in posts with id 317,334.
    Can you pls help me?

    Attachments are uploaded via CFS>allegato

    Thanks in advance

  3. 7 days, 11 hours ago Alex S Hi, I Work Here

    Hi M,

    The page should show me all attachments that are included in posts with id 317,334.

    Ah. I see what’s going on here. The post loop widget isn’t designed to output the attachments of a post but rather the posts themselves. There’s sadly no way to do what you’re trying to do at this time with the post loop widget. Sorry mate.

Please log in to post on our forums. Signing up is free.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More