خرید بک لینک

Vote count: 0

I'm using wordpress, don't think that's relevant since this is just php but just putting that out there.

I have two subsequent if statements, and I wondered if there is a cleaner way to do this rather than nesting them.

  <?php if(is_category('3')){ ?>
    <?php if( get_field('the_field') ): ?>
       // do action here
    <?php endif; ?>
  <?php endif; ?>

Is it possible to combine the two rather than nest them? I'd like to have clean code. I think this will work as is, but it looks messy.

asked 19 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 13 تير 1395 ساعت: 9:13

صفحه بندی