Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same issue here. Received this error to begin with:

    Error creating search views in the database. Deactivate Multisite Global Search and check you have create views privilege in your WordPress database.
    CREATE VIEW command denied to user 'user'@'localhost' for table 'wp_v_posts'

    Once I had granted the ‘CREATE VIEW’ privilege the error changed to:

    Error creating search views in the database. Deactivate Multisite Global Search and check you have create views privilege in your WordPress database.
    The used SELECT statements have a different number of columns

    Note just the last line changes:
    CREATE VIEW command denied to user 'user'@'localhost' for table 'wp_v_posts'
    to
    The used SELECT statements have a different number of columns

    So I’m thinking it’s a bug with a UNION SQL statement somewhere in the code. I’m going to do some fishing…

    Please post back if you discover a solution. TIA

    “You should view it as authorizing an application on Facebook/Twitter”

    Unfortunately, this isn’t what you’re actually doing. You’re actually forcing those who use your plugin to needlessly sign up to a 3rd party service – which conveniently limits you to 5 social network accounts before charging for the privilege.

    I don’t have a problem with you making money from it but I do have a problem with you cracking on all innocent.

    Hello lads and lasses,

    I’ve been working on something similar to this. Currently I’ve only managed to get a menu working down to Parent->child level and am currently investigating how to extend it to grandchildren.

    global $post;
    $parents = get_pages('parent=0&exclude=2&sort_column=menu_order');
    $output = '<ul>';
    foreach ($parents as $parent) {
    	$output .= '<li';
    	if ( $parent->ID == get_the_ID() || $parent->ID == $post->post_parent ){
    		$output .= ' class="current_page_item"><a href="'. get_page_link($parent->ID) .'">'. $parent->post_title .'</a>';
    		$children = get_pages('child_of='.$parent->ID.'&sort_column=menu_order');
    		if ($children){
    			$output .= '<ul>';
    			foreach ($children as $child) {
    				if ( $child->ID == get_the_ID() ){
    					$output .= '<li class="current_page_item"><a href="'. get_page_link($child->ID) .'">'. $child->post_title .'</a></li>';
    				}else{
    					$output .= '<li><a href="'. get_page_link($child->ID) .'">'. $child->post_title .'</a></li>';
    				}
    			}
    			$output .= '</ul>';
    		}
    	}else{
    		$output .= '><a href="'. get_page_link($parent->ID) .'">'. $parent->post_title .'</a>';
    	}
    	$output .= '</li>';
    }
    $output .= '</ul>';
    echo $output;

    Just 1 thing to note – I exclude page 2 in the parents as I use this as a custom homepage. Other than that it’s pretty generic code. Works in both 2.9.2 and 3.0-beta2

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