Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I was having the same problem with excluding. I came up with this quick solution for a project due tomorrow. I haven’t tested it too well, but it works for me, at least for the time being.
    Call the function by passing in the slugs for the categories to be excluded.
    for example:

    $args = array('inExcludeCat'=>'exclude', 'inExcludeCats'=> "portfolio,projects");
    collapsArch($args);

    The problem is in collapsArchList.php around line 69.
    Replace the code from lines 69 – 91 with the following.

    $inExclusionsCat = array();
    if ( !empty($inExcludeCat) && !empty($inExcludeCats) ) {
        if ($inExcludeCat=='include') {
          	$in='IN';
        } else {
          	$in='NOT IN';
        }
        $inExclusionsCat = "'".implode("','", explode(',', $inExcludeCats))."'";
    }
    if ( empty($inExclusionsCat) ) {
    	$inExcludeCatQuery = "";
      } else {
        $inExcludeCatQuery ="AND $wpdb->terms.slug NOT IN ($inExclusionsCat) AND taxonomy = 'category'";
     }

    Im just printing out .xml via a php script, but this worked for me. Not sure if it will help with more complicated issues.

    define('WP_USE_THEMES', false);
    require('../../../../wp-config.php');
    
    // output some xml //
    
    // now send the headers //
    $xml_string = $doc->saveXML();
    
    header('Content-Type: text/xml');
    header('Cache-Control: no-store');
    header("Content-length: " . strlen(utf8_decode($xml_string)));

    I am having this same issue. Any solutions out there?

    I am developing a plugin that does not deal with posts or pages, but with its own database of information. I am using the wordpress media uploader and I am trying to get the send_to_editor javascript function from wordpress. However, this does not work because of the error custom template error: “win.send_to_custom_field is not a function.” When I deactivate the plugin, I can catch the wp javascript event. I am using custom field template 1.74 and wordpress 3.0.1.

    Any help would be greatly appreciated. 🙂

    This solution works, once the document has loaded, window.send_to_custom_field = window.send_to_editor = function(html) {// code //}

Viewing 4 replies - 1 through 4 (of 4 total)