0
Hi, I’m trying to apply OWL-CAROUSEL to a custom post page. When I do in normal HTML, without PHP tags, it works great, but if I play in the wp_query loop it does not take the plugin and list the posts one under the other.
See the code below:
<div id="owl-demo" class="owl-carousel">
<?php
$estrutura = new WP_Query('post_type=estrutura&orderby=post_status&order=DESC&showposts=-1');
if($estrutura->have_posts()):while($estrutura->have_posts()): $estrutura->the_post();
?>
<div class="item">
<span>
<?php echo get_the_post_thumbnail($page->ID, array(501,301)); ?>
<!-- TAMANHO DA IMAGEM DEVE SER 1024x615 -->
<h1><?php the_title(); ?></h1>
</span>
<div>
<?php the_content(); ?>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_postdata();
?>
</div>
How can I solve this problem? Remembering that scripts are ok, all being called, as well as css’s.
Thanks in advance.
Are you using some wordpress plugin to call the Owl-Carousel or are using the direct jquery plugin?
– Ricardo BRGWeb
Hello Ricardo, I’m using the direct jquery plugin.
– Marcelo Almeida
And you are doing the jquery plugin framework?
– Ricardo BRGWeb
Yes, I use another plugin for navigation between tabs and works perfectly, in addition to other scripts. I took it to make sure it wasn’t a conflict between them, but it’s not.
– Marcelo Almeida
As you commented that it works when the data is entered manually I believe that the problem is your Query. You can provide the generated HTML for this block?
– Pedro Henrique