• Hi there,

    I am wondering, how can I write a filter, that handles this function:

    <?php $ajanlatok = new WP_Query('category_name=ajanlatok&posts_per_page=100&orderby=date&order=DESC'); ?>
    
    <?php while ($ajanlatok->have_posts()) : $ajanlatok->the_post(); ?>
    <option value="<?php the_ID(); ?>" <?php if ($_GET['offer-id'] == get_the_ID()) { echo("selected"); } ?>><?php the_title(); ?></option>
    <?php endwhile; ?>
  • The topic ‘WP Query to dynamic options’ is closed to new replies.