• Hi, I use get_option to get the settings for my querypost :
    <?php query_posts('cat=-'.get_option('excludecat')); ?>
    But now I also want to insert the showposts with get_option
    <?php query_posts('showposts='.get_option('p-post-show')); ?>
    And I can’t get this into on single code…

    Steven

Viewing 1 replies (of 1 total)
  • Thread Starter stevenoi

    (@stevenoi)

    Found the solution :

    <?php
    $wp_query->query_vars["cat"] = get_option('excludecat');
    $wp_query->query_vars["showposts"] = get_option('p-post-show');
    $wp_query->get_posts();
    ?>

Viewing 1 replies (of 1 total)

The topic ‘PHP in Querypost’ is closed to new replies.