Wrong post id for custom post type

35 Views Asked by At

I use a Revolution slider on my page and I am using meta based content depending on post-id. The problem is that the Revolution slider not take custom post type post id but current page id. Is there way to fix it? This is what I use in the Revolution slider:

[acf field="moto_name" post_id="{{id}}"]

This is what I use to call my custom post types in my custom wordpress page:

$args = array(
    'post_type'     => 'moto',
    'meta_key'      => 'moto_name',
    'meta_value'    => $name
);

$the_query = new WP_Query($args);

What can I do, to make revslider use custom post type ID instead of page id ?

0

There are 0 best solutions below