Last active
May 11, 2022 01:55
-
-
Save carlaizumibamford/1a907e0c672e4e0822bc2fa6dfec69fb to your computer and use it in GitHub Desktop.
Excluding Posts By Category Name In WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$id = get_cat_id('Category-Sample'); | |
$q = "cat=-" . $id; | |
query_posts($q); | |
if (have_posts()) : while (have_posts()) : the_post(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment