0

I just want to show the slider structure if it has posts...

is this correct?

<?php
if ( (have_posts() ) {
  get_template_part('slider');
}
?>

I think that works but I'm not sure if is the correct way to do that..

0

I think you have to enter the_post();, after have_post(),for more information on get_template_part(); refer to codex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.