WordPress.org

Ready to get started?Download WordPress

Forums

orderby=modified (3 posts)

  1. Pete
    Member
    Posted 5 years ago #

    For the life of me I don't know why but this hack isn't excluding category 15 from the list of posts that appear... any help greatly appreciated.

    <?php $d = 1; $query4 = new WP_Query();$query4->query('showposts='.$theme_options["fea3PostCount"].'&amp;exclude=15'.'&amp;cat='.$theme_options["fea3CatID"].'&amp;orderby=modified'); ?>

  2. stvwlf
    Member
    Posted 5 years ago #

    the syntax to exclude a category is cat=-15 not exclude=15

    in your case
    '&amp;cat=-15,'.$theme_options["fea3CatID"].'&amp;

    be sure to use a single ampersand and not the ampersand+amp; that the forum software converts ampersands to

  3. Pete
    Member
    Posted 5 years ago #

    thankyou

Topic Closed

This topic has been closed to new replies.

About this Topic