how to change template?

you could use this snippet, and modify the output string accordingly. $categories = get_the_category(); $separator=” “; $output=””; if ( ! empty( $categories ) ) { foreach( $categories as $category ) { $output .= ‘<a href=”‘ . esc_url( get_category_link( $category->term_id ) ) . ‘” alt=”‘ . esc_attr( sprintf( __( ‘View all posts in %s’, ‘textdomain’ ), … Read more

Display Slug instead of Name

From your code, it looks like product_cat is a custom taxonomy. get_the_terms returns an array you can get the slug from. For instance… $terms_array = get_the_terms($post->ID, ‘procuct_cat’); $term_slug = $terms_array[‘your index’]->slug;

Nav menu category links not showing

A wp_nav_menu is a manually created menu – WordPress doesn’t create it for you. If you want to keep using this function, you can go to either Appearance > Menus or Appearance > Customize > Menus, add links to the menu, and check the “primary” theme location under Display Location. However – if you’re just … Read more

I need to create a search form that will display search results from specific category

You can use WP_query() to narrow down the results of your search: <?php $args = array( ‘s’ => $_GET[‘s’], ‘post_type’ => array( ‘post’, ‘page’ ), ‘post_status’ => ‘publish’, ‘category_name’ => ‘music’, ‘posts_per_page’ => -1 ); $custom_search = new WP_Query( $args ); if ( $custom_search->have_posts() ) { while ( $custom_search->have_posts() ) : $custom_search->the_post(); ?> <div class=”entry-content”> … Read more