What is the equivalent to the wordpress query and loop?

how to make a query with actions.source.fetch()

I’m searching about something like

$args = [
    'post_type'             => 'post',
    'posts_per_page'        => 3,
    'orderby'               => 'date',
    'order'                 => 'DESC',
];

$query = new \WP_Query( $args );

It’s not very clear from this what you are trying to accomplish @modyydom :slight_smile:

Could you provide more details ?

in wordpress you can query some posts with this code

$args = [
    'post_type'             => 'post',
    'posts_per_page'        => 3,
    'orderby'               => 'date',
    'order'                 => 'DESC',
];

$query = new \WP_Query( $args );

this code will return the latest 3 posts in post type post

how to accomplish the same functionality in the frontity

thank you @mmczaplinski

I think what you are trying to achieve is done in frontity by using libraries.source.api.get(), followed by libraries.source.populate()

Have a look at the documentation for those 2 methods here:

Let me know if that helps :slight_smile: