• What would be the best way to add category header text (paragraph or intro related to that category)? It could be at the top of either the content section or sidebar
    Would I need an approach using a php include statement based on the category name or am I missing something simpler? Can I make a post a ‘sticky’ that stays in the #1 spot?
    Thx, Mookie

Viewing 16 replies (of 16 total)
  • phpneophyte

    (@phpneophyte)

    O.K Here’s what I Did;
    if (empty($orderby)) {
    $orderby=’date ‘.$order;
    Which needs to be something more like the following;
    if (empty($orderby)) {
    $orderby=’date ‘.$order;
    if (!empty($whichcat))
    $where .= ‘ OR post_status = “sticky”‘;
    else
    $where .= ‘ OR (post_status = “sticky” AND $whichcat==7)’;
    And of course, the sticky hack already requires that the line:
    $where .= ‘ AND (post_status = “publish”‘;
    is changed to something like:
    $where .= ‘ AND (post_status = “publish”‘ OR post_status = “sticky”;
    but you really want it in your case to be:
    $where .= ‘ AND (post_status = “publish”‘;
    if (!empty($whichcat))
    $where .= ‘ OR post_status = “sticky”‘;
    else
    $where .= ‘ OR (post_status = “sticky” AND $whichcat==7)’;
    This is the error I get:
    SQL/DB Error:
    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘==7) AND post_date <= ‘2004-04-25 11:26:19’ AND (post_status = ]
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 OR (post_status = “sticky” AND $whichcat==7) AND post_date <= ‘2004-04-25 11:26:19’ AND (post_status = “publish” OR post_status = “sticky”) ORDER BY post_status DESC, post_date DESC LIMIT 2
    Kevin

Viewing 16 replies (of 16 total)
  • The topic ‘How to make a Category header or ‘sticky’?’ is closed to new replies.