SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help needed with query please

    Hi guys,

    I'm working on a specific template for a category page within wordpress. I have a global function defined that retrieves the category id.`$ps_catid = get_query_var('cat');'

    What i'm trying to do is run a query that shows only posts that are in this current category ($ps_catid) but not also in the category of id=46. Some of my posts are in multiple categories you see.

    Can anyone help produce the code that will show all posts in the current category but not ones also in 46?

    I've tried having a go at this on my own but keep getting the dreaded white screen. Any help is much appreciated. Thanks

  2. #2
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    A white screen means there's a PHP error. The first step would be to turn on PHP error messages in your wp-config.php file, as indicated here:
    Code:
    define('WP_DEBUG', true);
    http://codex.wordpress.org/Debugging_in_WordPress
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •