Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?

You can limit a search to a particular post-type quite easily: https://www.wpbeginner.com/wp-tutorials/how-to-limit-search-results-for-specific-post-types-in-wordpress/ Or a nice simple way to limit a search to a particular category by adding a hidden field into the search form: https://www.wpexplorer.com/limit-wordpress-search/ In terms of post vs page for custom post types, you can find the differences on the documentation page for … Read more

How to get_term_meta on single custom post?

You will need to use get_the_terms() to get the taxonomy terms associated with the post and loop through them until you find one that has an image set: $post. = get_queried_object(); $terms. = get_the_terms( $post, ‘taxonomy_name_here’ ); $image_url = null; if ( $terms && ! is_wp_error( $terms ) ) { foreach ( $terms as $term … Read more

View the complete list of a taxonomy in the navigation menu

You can achieve the result using following code: $terms = get_terms( array( ‘taxonomy’ => ‘country’, ‘hide_empty’ => false, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ) ); if ( !empty($terms) ) : $output=”<ul>”; foreach( $terms as $country ) { $output.= ‘<li><a href=”‘.get_term_link( $country->term_id ).'”>’. esc_attr( $country->name ) .'</a></li>’; } $output.='</ul>’; echo $output; endif; Here I’m using … Read more

Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?

Credit for this answer goes entirely to CodeMascot: Create and move terms for taxonomies After troubleshooting, I believe the issue is because I initially created the custom taxonomy with the name Purpose, but then changed it to purpose at another time. Calling $object->taxonomy returns Purpose on the affected term, while all the others listed in … Read more