< id="comment-">
post_type == $post_type ) { ?>
%s -' ), get_comment_author_link() ) ?>
comment_approved == '0' ) : ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ) ?>
'date' ); $tags = wp_get_post_terms( $post->ID, $taxonomy, $tax_args ); if ( $tags ) { foreach ( $tags as $tag ) { $args = array( $param_type => $tag->slug, 'post__not_in' => array( $post->ID ), 'post_type' => POST_TYPE, 'posts_per_page' => 3, 'ignore_sticky_posts' => 1 ); } $my_query = null; $my_query = new WP_Query( $args ); $loop_count = 0; $col_class = ''; if ( $my_query->have_posts() ) { echo ''; } } wp_reset_query(); // to use the original query again } /** * Function Name: geocraft_excerpt * Description: It returns linked elipse * @param type $text * @return type */ function geocraft_excerpt( $more ) { return ' [...] Read More'; } add_filter( 'excerpt_more', 'geocraft_excerpt' ); /** * Function Name: geocraft_auth_menu * Description: Displays user menu * @global type $current_user */ function geocraft_auth_menu() { global $current_user; global $wpdb; $dashboard_pid = get_option( 'geo_dashboard_page' ); $ink = home_url( "/?page_id=$dashboard_pid" ); $geo_val = $wpdb->get_row( "SELECT * FROM $wpdb->posts WHERE ID =$dashboard_pid ", ARRAY_N ); if ( !$geo_val[0] ) { $wpdb->insert( $wpdb->posts, array( 'ID' => $dashboard_pid, 'post_author' => 1, 'post_date_gmt' => $dat, 'post_title' => 'Dashboard', 'post_status' => 'publish', 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_name' => 'dasboard', 'guid' => $ink, 'post_type' => 'page' ) ); $mylink = $wpdb->get_row( "SELECT * FROM $wpdb->postmeta WHERE post_id =$dashboard_pid ", ARRAY_N ); $wpdb->insert( $wpdb->postmeta, array( 'meta_id' => $mylink[0], 'post_id' => $dashboard_pid, 'meta_key' => '_wp_page_template', 'meta_value' => 'template_dashboard.php' ) ); } if ( $geo_val[7] == 'trash' ) { $wpdb->query( "UPDATE $wpdb->posts SET post_status = 'publish' WHERE ID =$dashboard_pid" ); } $geo_list = get_option( 'geo_submit_listing' ); $geo_url = site_url( '/?page_id=' . get_option( 'geo_submit_listing' ) ); $geo_val_list = $wpdb->get_row( "SELECT * FROM $wpdb->posts WHERE ID =$geo_list ", ARRAY_N ); if ( !$geo_val_list[0] ) { $wpdb->insert( $wpdb->posts, array( 'ID' => $geo_list, 'post_author' => 1, 'post_date_gmt' => $dat, 'post_title' => 'Add New Listing', 'post_status' => 'publish', 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_name' => 'submit-listing', 'guid' => $geo_url, 'post_type' => 'page', 'post_excerpt' => '' ) ); $listlink = $wpdb->get_row( "SELECT * FROM $wpdb->postmeta WHERE post_id =$geo_list ", ARRAY_N ); $wpdb->insert( $wpdb->postmeta, array( 'meta_id' => $listlink[0], 'post_id' => $geo_list, 'meta_key' => '_wp_page_template', 'meta_value' => 'template_submit.php', ) ); } if ( $geo_val_list[7] == 'trash' ) { $wpdb->query( "UPDATE $wpdb->posts SET post_status = 'publish' WHERE ID =$geo_list" ); } ?> prefix; $wpcat_id = NULL; //Fetch category $wpcategories = (array) $wpdb->get_results( " SELECT * FROM {$table_prefix}terms, {$table_prefix}term_taxonomy WHERE {$table_prefix}terms.term_id = {$table_prefix}term_taxonomy.term_id AND {$table_prefix}term_taxonomy.taxonomy ='" . $taxonomy . "' and {$table_prefix}term_taxonomy.parent=0 ORDER BY {$table_prefix}terms.name" ); $wpcategories = array_values( $wpcategories ); $wpcat2 = NULL; if ( $wpcategories ) { echo "