Convert Custom Table Data Based Plugin To Be Searchable

There is the post type attachment, which is normally used to store information about files uploaded to WordPress’ Media Library. Additional data can be saved into custom fields/postmeta. You definitely should look into that, if you decide to go with native WP tables. Another possibility would be to make those custom tables searchable, on the … Read more

Display what taxonomies a custom post has?

As there’s multiple Taxonomies, you will need to loop through all of the assigned taxonomies of that post type. get_object_taxonomies is the function which returns array of post type taxonomies. global $post; foreach ( get_object_taxonomies( $post ) as $tax_name ){ $taxonomy = get_taxonomy( $tax_name ); $label = $taxonomy->labels->name; the_terms( $post->ID, $tax_name, $label . ‘: ‘, … Read more

orderby parameter not working in custom query

orderby does not accept the values ASC or DESC. These are acceptable values for the parameter order. Changing ‘orderby’ => ‘rand’ to ‘order’ => ‘ASC’ should be sufficient and should by rule work As already pointed out, if (have_posts() ): should be if ($the_query->have_posts() ): Apart from that little discrepancy, you code have to work … Read more