Hot answers tagged

1

You should look at the WordPress Template Hierarchy. If you want to show an archive of your posts you create a template called archive-mahsulat.php where mahsulat is your post type. Then you can add a normal WordPress Loop to the file so it can output posts of that type. If you're looking to create a category page for your post type you first need to ...


1

Must be used inside the loop $post_images = get_children( $post->ID ); $images_count = count( $post_images ); echo $images_count;


Only top voted, non community-wiki answers of a minimum length are eligible