how to show perticular category posts in custome page

You can use is_category to check if the category is “members” and then load the appropriate template. In get_template_part() use the template name for the second parameter instead of get_post_format(). In this example your template should be named “content-members.php.” while ( have_posts() ) : the_post(); if ( is_category( ‘members’ ) ) { get_template_part( ‘content’, ‘members’ … Read more

Query a custom taxonomy for certain posts

You are setting your taxonomy arguments incorrectly in WP_Query. You need to set up a tax_query, which takes an array of arrays. See the codex. $args = array( ‘post_type’ => ‘post’, ‘orderby’ => ‘rand’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘newsdates’, ‘field’ => ‘id’, ‘terms’ => $field ) ) );

Issue on adding Icons to Custom Post Type

This code works perfectly for me: add_action( ‘admin_head’, ‘my_icons’ ); function my_icons() { ?> <style type=”text/css” media=”screen”> #menu-posts-product .wp-menu-image, .icon32-posts-product { background: url(<?php echo get_template_directory_uri(); ?>/img/contactLensemenu.png) no-repeat center center!important; } #menu-posts-product .wp-menu-image { background-size:16px 16px!important; } .icon32-posts-product { background-size:32px 32px!important; } </style> <?php } ?> PHP part is the same of the yours, (except for … Read more