Disaply products from category

If you’re actually using categories (and not a custom taxonomy) then your category-name needs to be the slug, not the actual name. If, however, you are using a custom taxononomy (and you’ll know if you are) then you should use ‘name-of-your-custom-tax’ => ‘slug’ You can also see the below links for details. http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

Related Posts: if there is no category use tags

There is no mistake in code it is not working because of just comma mistake use this i have made charges into it. function dtwd_related_posts_shortcode($atts){ extract(shortcode_atts(array( ‘count’=> ‘3’, ‘title’ => ‘More useful tips’, ), $atts)); global $post; $current_cat = get_the_category($post->ID); $current_cat = $current_cat[0]->cat_ID; $this_cat=””; $tag_ids = array(); $tags = get_the_tags($post->ID); if ($tags) { foreach($tags as … Read more

Submit New Post

You should take a look at the redirect_post_location filter Here is a snippet: add_filter( ‘redirect_post_location’, ‘yourcustom_redirect_post_location’ ); function yourcustom_redirect_post_location( $location, $post_id ) { if ( isset( $_POST[‘save’] ) || isset( $_POST[‘publish’] ) ){ return get_permalink( $post_id ); } return $location; }

Display images of related posts

I’m fetching the attachment ID by get_post_thumbnail_id function which is taking the post ID. After getting the attachment ID of that post, I am passing this attachment ID to wp_get_attachment_image_src function and getting the image details. So I am rewriting your foreach loop like this way foreach($related as $r) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($r->ID), ‘thumbnail’, … Read more

WordPress the_category(); only works with message-posts not with project posts, how do I specify project categories?

the_category and wp_list_categories are for the category taxonomy term. What most people call a category is most likely a taxonomy. Category is just a default taxonomy for the post post type. You need to use the general taxonomy functions such as the_terms and get_the_term_list. echo ‘<li>’; echo get_the_term_list($post->ID, ‘project_category’); echo ‘</li>’; You will need to … Read more